LDAP: make oc_user_ldap::userExists make use of central OC_LDAP

This commit is contained in:
Arthur Schiwon 2012-05-03 23:44:12 +02:00
parent 6f982d2e20
commit 7aad40ca4d
1 changed files with 9 additions and 8 deletions

View File

@ -185,14 +185,6 @@ class OC_USER_LDAP extends OC_User_Backend {
}
public function userExists( $uid ) {
if(!$this->configured){
return false;
}
$dn = $this->getDc($uid);
return !empty($dn);
}
/**
* @brief Get a list of all users
* @returns array with all uids
@ -205,6 +197,15 @@ class OC_USER_LDAP extends OC_User_Backend {
return $users;
}
/**
* @brief check if a user exists
* @param string $uid the username
* @return boolean
*/
public static function userExists($uid){
return in_array($uid, self::getUsers());
}
}