mirror of
https://github.com/nextcloud/server.git
synced 2026-03-09 01:40:53 -04:00
check if renamed user is still valid by reapplying the ldap filter (#25338)
This commit is contained in:
parent
59fc3ff45a
commit
aa42d60c5f
1 changed files with 4 additions and 0 deletions
|
|
@ -228,6 +228,10 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
|
|||
return false;
|
||||
}
|
||||
$newDn = $this->access->getUserDnByUuid($uuid);
|
||||
//check if renamed user is still valid by reapplying the ldap filter
|
||||
if(!is_array($this->access->readAttribute($newDn, '', $this->access->connection->ldapUserFilter))) {
|
||||
return false;
|
||||
}
|
||||
$this->access->getUserMapper()->setDNbyUUID($newDn, $uuid);
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue