parent
6a55506b0c
commit
feeca87eb0
@ -4,7 +4,10 @@ $defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
|||||||
if ($user->isAuthenticated()) {
|
if ($user->isAuthenticated()) {
|
||||||
// Reset failed login counter
|
// Reset failed login counter
|
||||||
$user->setUserFailed($_SESSION['USERDATA']['id'], 0);
|
$user->setUserFailed($_SESSION['USERDATA']['id'], 0);
|
||||||
if (!empty($_SERVER['HTTP_REFERER'])) header("Location: " . $_SERVER['HTTP_REFERER']);
|
$port = ($_SERVER["SERVER_PORT"] == "80" || $_SERVER["SERVER_PORT"] == "443") ? "" : (":".$_SERVER["SERVER_PORT"]);
|
||||||
|
$pushto = $_SERVER['SCRIPT_NAME'].'?page=dashboard';
|
||||||
|
$location = (@$_SERVER['HTTPS'] == 'on') ? 'https://' . $_SERVER['SERVER_NAME'] . $port . $pushto : 'http://' . $_SERVER['SERVER_NAME'] . $port . $pushto;
|
||||||
|
header("Location: " . $location);
|
||||||
}
|
}
|
||||||
// Somehow we still need to load this empty template
|
// Somehow we still need to load this empty template
|
||||||
$smarty->assign("CONTENT", "empty");
|
$smarty->assign("CONTENT", "empty");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user