diff options
author | blizzz <blizzz@owncloud.com> | 2012-12-12 16:59:43 -0800 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2012-12-12 16:59:43 -0800 |
commit | 680ff3a51b577fafec4a012385dba1292aaeea34 (patch) | |
tree | b27b049507f6bb36744dc23de6e42459a13b6206 /lib/user.php | |
parent | 8686a448c738bf7b2b0264d79557b976b2dca478 (diff) | |
parent | de34f771c22b9a54fa22d9c00741e362f47c852d (diff) | |
download | nextcloud-server-680ff3a51b577fafec4a012385dba1292aaeea34.tar.gz nextcloud-server-680ff3a51b577fafec4a012385dba1292aaeea34.zip |
Merge pull request #584 from wardragon/ldap_access_userExists_fix
Really fix OCP\Share::shareItem with LDAP users
Diffstat (limited to 'lib/user.php')
-rw-r--r-- | lib/user.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/user.php b/lib/user.php index 94ea899b841..80f88ca7052 100644 --- a/lib/user.php +++ b/lib/user.php @@ -414,10 +414,15 @@ class OC_User { /** * @brief check if a user exists * @param string $uid the username + * @param string $excludingBackend (default none) * @return boolean */ - public static function userExists($uid) { + public static function userExists($uid, $excludingBackend=null) { foreach(self::$_usedBackends as $backend) { + if (!is_null($excludingBackend) && !strcmp(get_class($backend),$excludingBackend)) { + OC_Log::write('OC_User', $excludingBackend . 'excluded from user existance check.', OC_Log::DEBUG); + continue; + } $result=$backend->userExists($uid); if($result===true) { return true; |