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__);
|
||||
if (!empty($username)){
|
||||
$USERINFO = $this->getUserData($username,true);
|
||||
$success = true;
|
||||
$_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;
|
||||
if ($USERINFO !== false){
|
||||
$success = true;
|
||||
$_SESSION[DOKU_COOKIE]['auth']['user'] = $username;
|
||||
$_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO;
|
||||
}
|
||||
}
|
||||
return $success;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue