Skip to content
Snippets Groups Projects
Commit 7aad40ca authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

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

parent 6f982d2e
No related branches found
No related tags found
No related merge requests found
......@@ -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());
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment