Added extra check to session delete.

This commit is contained in:
xevidos 2018-07-24 09:45:36 -04:00
parent e903608001
commit 6da112e8a9

View File

@ -57,6 +57,7 @@ class User
$_SESSION['user'] = $this->username;
$_SESSION['lang'] = $this->lang;
$_SESSION['theme'] = $this->theme;
$_SESSION['login_session'] = true;
if ($user['project']!='') {
$_SESSION['project'] = $user['project'];
}
@ -114,7 +115,7 @@ class User
//echo var_dump( $_SESSION ) . "\n\n";
$_SESSION['lang'] = $this->lang;
$_SESSION['theme'] = $this->theme;
if ( ( isset( $_SESSION["user"] ) && $_SESSION["user"] == $username && ( isset( $_SESSION['lang'] ) && isset( $_SESSION['theme'] ) ) ) || empty( $_SESSION ) ) {
if ( ( isset( $_SESSION["user"] ) && $_SESSION["user"] == $username && ( isset( $_SESSION['lang'] ) && isset( $_SESSION['theme'] ) ) && isset( $_SESSION['login_session'] ) && $_SESSION['login_session'] == true ) || empty( $_SESSION ) ) {
session_unset();
session_destroy();