diff options
author | Lorenzo M. Catucci <lorenzo@sancho.ccd.uniroma2.it> | 2012-12-06 18:11:14 +0100 |
---|---|---|
committer | Lorenzo M. Catucci <lorenzo@sancho.ccd.uniroma2.it> | 2012-12-07 17:19:30 +0100 |
commit | de34f771c22b9a54fa22d9c00741e362f47c852d (patch) | |
tree | bf008315d927500ebac37f290fcb0c9c58155650 /apps | |
parent | 15afbfd198f9f54cee8717776b4f45f73d9b1cbf (diff) | |
download | nextcloud-server-de34f771c22b9a54fa22d9c00741e362f47c852d.tar.gz nextcloud-server-de34f771c22b9a54fa22d9c00741e362f47c852d.zip |
Exclude LDAP backend from global user searches
triggered by itself.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/access.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 53d4edbe69c..f71f4035928 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -281,8 +281,8 @@ abstract class Access { } $ldapname = $this->sanitizeUsername($ldapname); - //a new user/group! Then let's try to add it. We're shooting into the blue with the user/group name, assuming that in most cases there will not be a conflict. Otherwise an error will occur and we will continue with our second shot. - if(($isUser && !\OCP\User::userExists($ldapname)) || (!$isUser && !\OC_Group::groupExists($ldapname))) { + //a new user/group! Add it only if it doesn't conflict with other backend's users or existing groups + if(($isUser && !\OCP\User::userExists($ldapname, 'OCA\\user_ldap\\USER_LDAP')) || (!$isUser && !\OC_Group::groupExists($ldapname))) { if($this->mapComponent($dn, $ldapname, $isUser)) { return $ldapname; } @@ -874,4 +874,4 @@ abstract class Access { return $pagedSearchOK; } -}
\ No newline at end of file +} |