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 { ...@@ -111,7 +111,7 @@ class login_index {
$sql = "DELETE FROM `attempts_login` WHERE `ip`='{$ip}'"; $sql = "DELETE FROM `attempts_login` WHERE `ip`='{$ip}'";
$app->db->query($sql); $app->db->query($sql);
$user = $app->db->toLower($user); $user = $app->db->toLower($user);
if ($loginAs) $oldSession = $_SESSION['s_old']; if ($loginAs) $oldSession = $_SESSION['s'];
$_SESSION = array(); $_SESSION = array();
if ($loginAs) $_SESSION['s_old'] = $oldSession; // keep the way back! if ($loginAs) $_SESSION['s_old'] = $oldSession; // keep the way back!
$_SESSION['s']['user'] = $user; $_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