diff options
Diffstat (limited to 'apps/user_ldap/lib/User_LDAP.php')
-rw-r--r-- | apps/user_ldap/lib/User_LDAP.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index 506ea36c529..cc3bf85716f 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -38,6 +38,7 @@ namespace OCA\User_LDAP; +use OC\ServerNotAvailableException; use OC\User\Backend; use OC\User\NoUserException; use OCA\User_LDAP\Exceptions\NotOnLDAP; @@ -317,16 +318,18 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn try { $uuid = $this->access->getUserMapper()->getUUIDByDN($dn); - if(!$uuid) { + if (!$uuid) { 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))) { + if (!is_array($this->access->readAttribute($newDn, '', $this->access->connection->ldapUserFilter))) { return false; } $this->access->getUserMapper()->setDNbyUUID($newDn, $uuid); return true; + } catch (ServerNotAvailableException $e) { + throw $e; } catch (\Exception $e) { return false; } |