Exclude LDAP backend from global user searches
triggered by itself.
This commit is contained in:
parent
15afbfd198
commit
de34f771c2
|
@ -281,8 +281,8 @@ abstract class Access {
|
||||||
}
|
}
|
||||||
$ldapname = $this->sanitizeUsername($ldapname);
|
$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.
|
//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)) || (!$isUser && !\OC_Group::groupExists($ldapname))) {
|
if(($isUser && !\OCP\User::userExists($ldapname, 'OCA\\user_ldap\\USER_LDAP')) || (!$isUser && !\OC_Group::groupExists($ldapname))) {
|
||||||
if($this->mapComponent($dn, $ldapname, $isUser)) {
|
if($this->mapComponent($dn, $ldapname, $isUser)) {
|
||||||
return $ldapname;
|
return $ldapname;
|
||||||
}
|
}
|
||||||
|
@ -874,4 +874,4 @@ abstract class Access {
|
||||||
return $pagedSearchOK;
|
return $pagedSearchOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue