diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-08-14 17:57:24 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-08-20 15:05:09 +0200 |
commit | 0f958bf5950b60589d6e336e80bbadb9707bc3b1 (patch) | |
tree | cae86485ee55583f1c95b1ba874a6c620d8faaf5 /apps | |
parent | 7dfb837766376576698ee9667bc471aec32854e9 (diff) | |
download | nextcloud-server-0f958bf5950b60589d6e336e80bbadb9707bc3b1.tar.gz nextcloud-server-0f958bf5950b60589d6e336e80bbadb9707bc3b1.zip |
don't force LDAP updates on userExists anymore
and remove some deprecated code
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/User_LDAP.php | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index 4eb72592789..41e58f0a07d 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -317,11 +317,6 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn $dn = $user->getDN(); //check if user really still exists by reading its entry if(!is_array($this->access->readAttribute($dn, '', $this->access->connection->ldapUserFilter))) { - $lcr = $this->access->connection->getConnectionResource(); - if(is_null($lcr)) { - throw new \Exception('No LDAP Connection to server ' . $this->access->connection->ldapHost); - } - try { $uuid = $this->access->getUserMapper()->getUUIDByDN($dn); if (!$uuid) { @@ -329,7 +324,7 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn } $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))) { + if ($newDn === $dn || !is_array($this->access->readAttribute($newDn, '', $this->access->connection->ldapUserFilter))) { return false; } $this->access->getUserMapper()->setDNbyUUID($newDn, $uuid); @@ -375,9 +370,6 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn $result = $this->userExistsOnLDAP($user); $this->access->connection->writeToCache('userExists'.$uid, $result); - if($result === true) { - $user->update(); - } return $result; } |