mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
- Better session handling for the logout/wrong password case
SVN:code[21]
This commit is contained in:
@@ -90,6 +90,17 @@ h1 {
|
||||
}
|
||||
if (!UserRights::Login($sAuthUser, $sAuthPwd))
|
||||
{
|
||||
// Unset all of the session variables.
|
||||
$_SESSION = array();
|
||||
// If it's desired to kill the session, also delete the session cookie.
|
||||
// Note: This will destroy the session, and not just the session data!
|
||||
if (isset($_COOKIE[session_name()]))
|
||||
{
|
||||
setcookie(session_name(), '', time()-3600, '/');
|
||||
}
|
||||
// Finally, destroy the session.
|
||||
session_destroy();
|
||||
|
||||
$oPage = new login_web_page();
|
||||
$oPage->DisplayLoginForm( true /* failed attempt */);
|
||||
$oPage->output();
|
||||
|
||||
Reference in New Issue
Block a user