Fix httpldap auth plugin logic in case of mismatch
(user authenticated but not in LDAP)
This commit is contained in:
parent
f20cef3931
commit
659fa46978
|
@ -52,14 +52,11 @@ class auth_plugin_authhttpldap extends auth_plugin_authldap {
|
||||||
$this->_debug('LemonLDAP::NG Login Name: '.htmlspecialchars($username),0,__LINE__,__FILE__);
|
$this->_debug('LemonLDAP::NG Login Name: '.htmlspecialchars($username),0,__LINE__,__FILE__);
|
||||||
if (!empty($username)){
|
if (!empty($username)){
|
||||||
$USERINFO = $this->getUserData($username,true);
|
$USERINFO = $this->getUserData($username,true);
|
||||||
$success = true;
|
if ($USERINFO !== false){
|
||||||
$_SESSION[DOKU_COOKIE]['auth']['user'] = $username;
|
$success = true;
|
||||||
$_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO;
|
$_SESSION[DOKU_COOKIE]['auth']['user'] = $username;
|
||||||
}
|
$_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO;
|
||||||
// Deny access if user is not found in LDAP
|
}
|
||||||
// This should never happen
|
|
||||||
if (!empty($USERINFO['dn'])){
|
|
||||||
$success = false;
|
|
||||||
}
|
}
|
||||||
return $success;
|
return $success;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue