Skip to content

Commit

Permalink
GH-224 Use existing util to kill session
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Jun 18, 2022
1 parent 7399d78 commit 5f0f569
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,9 @@
} else {
doquery("UPDATE {{table}} SET `darkEnergy` = `darkEnergy` - 10, `username` = '{$NewNick}', `old_username` = '{$_User['username']}', `old_username_expire` = UNIX_TIMESTAMP() + (7*24*60*60) WHERE `id` = {$_User['id']} LIMIT 1;", 'users');
doquery("INSERT INTO {{table}} VALUES(NULL, {$_User['id']}, UNIX_TIMESTAMP(), '{$NewNick}', '{$_User['username']}');", 'nick_changelog');
setcookie(getSessionCookieKey(), '', $Now - 3600, '/', '');

Session\Utils\Cookie\clearSessionCookie();

message($_Lang['NewNick_saved'], $_Lang['NickChange_Title'], 'login.php');
}
}
Expand Down

0 comments on commit 5f0f569

Please sign in to comment.