|
|
@ -811,10 +811,11 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function logout_user() {
|
|
|
|
function logout_user() {
|
|
|
|
session_destroy();
|
|
|
|
@session_destroy();
|
|
|
|
if (isset($_COOKIE[session_name()])) {
|
|
|
|
if (isset($_COOKIE[session_name()])) {
|
|
|
|
setcookie(session_name(), '', time()-42000, '/');
|
|
|
|
setcookie(session_name(), '', time()-42000, '/');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
session_commit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function validate_csrf($csrf_token) {
|
|
|
|
function validate_csrf($csrf_token) {
|
|
|
@ -856,8 +857,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!$_SESSION["uid"]) {
|
|
|
|
if (!$_SESSION["uid"]) {
|
|
|
|
@session_destroy();
|
|
|
|
logout_user();
|
|
|
|
setcookie(session_name(), '', time()-42000, '/');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render_login_form();
|
|
|
|
render_login_form();
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|