use caching for userExists
This commit is contained in:
parent
83fbdc903f
commit
2a82964830
|
@ -66,6 +66,7 @@ class Manager extends PublicEmitter {
|
|||
* remove all user backends
|
||||
*/
|
||||
public function clearBackends() {
|
||||
$this->cachedUsers = array();
|
||||
$this->backends = array();
|
||||
}
|
||||
|
||||
|
@ -109,12 +110,8 @@ class Manager extends PublicEmitter {
|
|||
* @return bool
|
||||
*/
|
||||
public function userExists($uid) {
|
||||
foreach ($this->backends as $backend) {
|
||||
if ($backend->userExists($uid)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
$user = $this->get($uid);
|
||||
return ($user !== null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue