|
|
|
@ -154,6 +154,8 @@ $gidReset = isset($gidReset) ? $gidReset : ''; |
|
|
|
|
|
|
|
|
|
// parameters passed via POST |
|
|
|
|
$login = isset($_POST["login"]) ? $_POST["login"] : ''; |
|
|
|
|
// register if the user is just logging in, in order to redirect him |
|
|
|
|
$logging_in = false; |
|
|
|
|
|
|
|
|
|
/* MAIN CODE */ |
|
|
|
|
|
|
|
|
@ -279,6 +281,7 @@ if (!empty($_SESSION['_user']['user_id']) && ! ($login || $logout)) { |
|
|
|
|
$_user['status'] = $uData['status']; |
|
|
|
|
Session::write('_user',$_user); |
|
|
|
|
event_login(); |
|
|
|
|
$logging_in = true; |
|
|
|
|
} else { |
|
|
|
|
$loginFailed = true; |
|
|
|
|
Session::erase('_uid'); |
|
|
|
@ -322,6 +325,7 @@ if (!empty($_SESSION['_user']['user_id']) && ! ($login || $logout)) { |
|
|
|
|
|
|
|
|
|
Session::write('_user',$_user); |
|
|
|
|
event_login(); |
|
|
|
|
$logging_in = true; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
$loginFailed = true; |
|
|
|
@ -1100,5 +1104,5 @@ if (isset($_cid)) { |
|
|
|
|
Database::query($sql); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Redirect::session_request_uri(); |
|
|
|
|
Redirect::session_request_uri($logging_in); |
|
|
|
|
|
|
|
|
|