diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-08-22 15:22:52 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-08-22 15:22:52 +0200 |
commit | 536fbb918919b3eb4c8d58b1d4e540c772353b07 (patch) | |
tree | 65bec0f1f7619c16366d9f379c4f0a227a2ce8d8 /apps | |
parent | 63c454c7b26b36060a170ef74f19b2fd65310879 (diff) | |
download | nextcloud-server-536fbb918919b3eb4c8d58b1d4e540c772353b07.tar.gz nextcloud-server-536fbb918919b3eb4c8d58b1d4e540c772353b07.zip |
LDAP: fix potentially unavailable LDAP resource, which can prevent successful login
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/connection.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index 503245a3390..9bb012e910e 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -91,6 +91,9 @@ class Connection { public function getConnectionResource() { if(!$this->ldapConnectionRes) { $this->init(); + } else if(!is_resource($this->ldapConnectionRes)) { + $this->ldapConnectionRes = null; + $this->establishConnection(); } if(is_null($this->ldapConnectionRes)) { \OCP\Util::writeLog('user_ldap', 'Connection could not be established', \OCP\Util::ERROR); |