Fix: Rebind LDAP connection after successful login with administrative user

This commit is contained in:
Lucas Bartholemy 2017-10-25 15:31:19 +02:00
parent f761b159f6
commit ab8039a456
2 changed files with 8 additions and 2 deletions

View File

@ -9,4 +9,5 @@ HumHub Change Log - v1.3-dev Branch
- Chg: Switched from Composer FXP plugin to Asset Packagist repository
- Enh: Committed composer.lock
- Enh: Refactored ContentContainer Controller
- Chg: Added ContentContainer ModuleManager, instead of individual handling (Space/User)
- Chg: Added ContentContainer ModuleManager, instead of individual handling (Space/User)
- Fix: Rebind LDAP connection after successful login with administrative user

View File

@ -333,7 +333,12 @@ class ZendLdapClient extends BaseFormAuth implements interfaces\AutoSyncUsers, i
try {
$this->getLdap()->bind($userName, $this->login->password);
return $this->getLdap()->getCanonicalAccountName($userName, Ldap::ACCTNAME_FORM_DN);
$dn = $this->getLdap()->getCanonicalAccountName($userName, Ldap::ACCTNAME_FORM_DN);
// Rebind with administrative DN
$this->getLdap()->bind();
return $dn;
} catch (LdapException $ex) {
// User not found in LDAP
}