summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-08-22 15:22:52 +0200
committerArthur Schiwon <blizzz@owncloud.com>2012-08-22 15:22:52 +0200
commit536fbb918919b3eb4c8d58b1d4e540c772353b07 (patch)
tree65bec0f1f7619c16366d9f379c4f0a227a2ce8d8 /apps
parent63c454c7b26b36060a170ef74f19b2fd65310879 (diff)
downloadnextcloud-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.php3
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);