summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/user_ldap.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2015-03-31 13:42:23 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2015-04-10 09:12:37 +0200
commit488405d1ec41faefaa3cbbc60a0c1b23745b6a31 (patch)
tree863c571ca79815cf9c19acb068f581f69f2d4ba1 /apps/user_ldap/user_ldap.php
parent43b503641c9f3cc705f4a5c318c4122d00f8940a (diff)
downloadnextcloud-server-488405d1ec41faefaa3cbbc60a0c1b23745b6a31.tar.gz
nextcloud-server-488405d1ec41faefaa3cbbc60a0c1b23745b6a31.zip
do not hide exception when ldap server has a hiccup
Diffstat (limited to 'apps/user_ldap/user_ldap.php')
-rw-r--r--apps/user_ldap/user_ldap.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 54e14c093f3..cd8a2dd251c 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -190,6 +190,7 @@ class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
* check if a user exists
* @param string $uid the username
* @return boolean
+ * @throws \Exception when connection could not be established
*/
public function userExists($uid) {
if($this->access->connection->isCached('userExists'.$uid)) {
@@ -208,17 +209,12 @@ class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
return true;
}
- try {
- $result = $this->userExistsOnLDAP($user);
- $this->access->connection->writeToCache('userExists'.$uid, $result);
- if($result === true) {
- $user->update();
- }
- return $result;
- } catch (\Exception $e) {
- \OCP\Util::writeLog('user_ldap', $e->getMessage(), \OCP\Util::WARN);
- return false;
+ $result = $this->userExistsOnLDAP($user);
+ $this->access->connection->writeToCache('userExists'.$uid, $result);
+ if($result === true) {
+ $user->update();
}
+ return $result;
}
/**