mirror of
https://github.com/xevidos/codiad.git
synced 2024-11-10 21:26:35 +01:00
Merge branch 'development' into 'master'
Fixed incorrect sessions deletion issue. See merge request xevidos/codiad!11
This commit is contained in:
commit
988c07b0f4
@ -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'];
|
||||
}
|
||||
@ -112,8 +113,9 @@ class User
|
||||
session_id( $session );
|
||||
session_start();
|
||||
//echo var_dump( $_SESSION ) . "\n\n";
|
||||
|
||||
if ( ( isset( $_SESSION["user"] ) && $_SESSION["user"] == $username ) || empty( $_SESSION ) ) {
|
||||
$_SESSION['lang'] = $this->lang;
|
||||
$_SESSION['theme'] = $this->theme;
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user