mirror of
https://github.com/xevidos/codiad.git
synced 2024-12-22 13:52:16 +01:00
Added extra check to session delete.
This commit is contained in:
parent
e903608001
commit
6da112e8a9
1 changed files with 2 additions and 1 deletions
|
@ -57,6 +57,7 @@ class User
|
||||||
$_SESSION['user'] = $this->username;
|
$_SESSION['user'] = $this->username;
|
||||||
$_SESSION['lang'] = $this->lang;
|
$_SESSION['lang'] = $this->lang;
|
||||||
$_SESSION['theme'] = $this->theme;
|
$_SESSION['theme'] = $this->theme;
|
||||||
|
$_SESSION['login_session'] = true;
|
||||||
if ($user['project']!='') {
|
if ($user['project']!='') {
|
||||||
$_SESSION['project'] = $user['project'];
|
$_SESSION['project'] = $user['project'];
|
||||||
}
|
}
|
||||||
|
@ -114,7 +115,7 @@ class User
|
||||||
//echo var_dump( $_SESSION ) . "\n\n";
|
//echo var_dump( $_SESSION ) . "\n\n";
|
||||||
$_SESSION['lang'] = $this->lang;
|
$_SESSION['lang'] = $this->lang;
|
||||||
$_SESSION['theme'] = $this->theme;
|
$_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_unset();
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
|
Loading…
Reference in a new issue