fixed "force user to logout"
parent
3f7ebec941
commit
6e1d7ebc12
|
@ -3,9 +3,11 @@ session_start();
|
||||||
%PLEAZE_NO_CACHE%
|
%PLEAZE_NO_CACHE%
|
||||||
$navbar = "login";
|
$navbar = "login";
|
||||||
if (isset($_SESSION['user_id'])){
|
if (isset($_SESSION['user_id'])){
|
||||||
$login = true;
|
if (ini_get("session.use_cookies")) {
|
||||||
} else {
|
$params = session_get_cookie_params();
|
||||||
$login = false;
|
setcookie(session_name(), '', time() - 42000, $params["path"], $params["domain"], $params["secure"], $params["httponly"]);
|
||||||
|
}
|
||||||
|
session_destroy();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
@ -15,11 +17,6 @@ if (isset($_SESSION['user_id'])){
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<?php
|
|
||||||
if($login){
|
|
||||||
echo "<meta http-equiv='refresh' content='0;%CONTENT_DIR%/userhome' />";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
%NAVBAR%
|
%NAVBAR%
|
||||||
|
|
Loading…
Reference in New Issue