summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLorenzo M. Catucci <lorenzo@sancho.ccd.uniroma2.it>2012-12-06 18:11:14 +0100
committerArthur Schiwon <blizzz@owncloud.com>2012-12-13 02:07:41 +0100
commitb0a81b5b0d727ba809bf723fc4d0504e5910a999 (patch)
tree0284274ae7a29e02d19d0bd1d928de2bf2649ebf /apps
parentf2eef0ccf8b471c5f84400ee8e6902c199de4911 (diff)
downloadnextcloud-server-b0a81b5b0d727ba809bf723fc4d0504e5910a999.tar.gz
nextcloud-server-b0a81b5b0d727ba809bf723fc4d0504e5910a999.zip
backport of de34f771c22b9a54fa22d9c00741e362f47c852d
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/lib/access.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 7702f16df5c..f2370cbb3d5 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -283,8 +283,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;
}
@@ -755,4 +755,4 @@ abstract class Access {
private function DNasBaseParameter($dn) {
return str_replace('\\5c', '\\', $dn);
}
-} \ No newline at end of file
+}