diff --git a/root/usr/share/dokuwiki/lib/plugins/authhttpldap/auth.php b/root/usr/share/dokuwiki/lib/plugins/authhttpldap/auth.php index ae07b83..c2ea5b2 100644 --- a/root/usr/share/dokuwiki/lib/plugins/authhttpldap/auth.php +++ b/root/usr/share/dokuwiki/lib/plugins/authhttpldap/auth.php @@ -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; }