feature: Better error messages for ad_auth (#4385)

This commit is contained in:
Tony Murray
2016-09-09 08:04:03 -05:00
committed by GitHub
parent 833f509c36
commit 956e18ffcd
3 changed files with 39 additions and 18 deletions

View File

@@ -102,7 +102,12 @@ if ((isset($_SESSION['username'])) || (isset($_COOKIE['sess_id'],$_COOKIE['token
exit;
}
} elseif (isset($_SESSION['username'])) {
$auth_message = 'Authentication Failed';
global $auth_error;
if (isset($auth_error)) {
$auth_message = $auth_error;
} else {
$auth_message = 'Authentication Failed';
}
unset($_SESSION['authenticated']);
dbInsert(array('user' => $_SESSION['username'], 'address' => get_client_ip(), 'result' => 'Authentication Failure'), 'authlog');
}