mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
LDAP: fix potentially unavailable LDAP resource, which can prevent successful login
This commit is contained in:
parent
63c454c7b2
commit
536fbb9189
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue