Commit 3300f959 authored by vogelor's avatar vogelor
Browse files

Fixed a bug in "login as". Now the user can "re-login" as admin.

parent edcc9406
......@@ -111,7 +111,7 @@ class login_index {
$sql = "DELETE FROM `attempts_login` WHERE `ip`='{$ip}'";
$user = $app->db->toLower($user);
if ($loginAs) $oldSession = $_SESSION['s_old'];
if ($loginAs) $oldSession = $_SESSION['s'];
$_SESSION = array();
if ($loginAs) $_SESSION['s_old'] = $oldSession; // keep the way back!
$_SESSION['s']['user'] = $user;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment