diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-05-03 23:44:12 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-05-04 13:26:07 +0200 |
commit | 7aad40ca4dabdb4bc5cc7be1726f9e469443df3b (patch) | |
tree | 81902cb0d06111f60d186dac19d7d71e45dd5d04 /apps/user_ldap/user_ldap.php | |
parent | 6f982d2e202fe61413d736d49e24dc85c9c1684f (diff) | |
download | nextcloud-server-7aad40ca4dabdb4bc5cc7be1726f9e469443df3b.tar.gz nextcloud-server-7aad40ca4dabdb4bc5cc7be1726f9e469443df3b.zip |
LDAP: make oc_user_ldap::userExists make use of central OC_LDAP
Diffstat (limited to 'apps/user_ldap/user_ldap.php')
-rwxr-xr-x | apps/user_ldap/user_ldap.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index d24af5e2f82..0fa621194c8 100755 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -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()); + } + } |