From 32c19778fb51064ec4a21a56dd5b2eab4917b011 Mon Sep 17 00:00:00 2001 From: printempw Date: Fri, 22 Jan 2016 10:41:36 +0800 Subject: [PATCH] fixed problem that cant access uploading page after logging in --- user/index.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/user/index.php b/user/index.php index 72f4b3c6..cacae4fa 100644 --- a/user/index.php +++ b/user/index.php @@ -16,6 +16,11 @@ function __autoload($classname) { $action = utils::getValue('action', $_GET); +if(isset($_COOKIE['uname']) && isset($_COOKIE['token'])) { + $_SESSION['uname'] = $_COOKIE['uname']; + $_SESSION['token'] = $_COOKIE['token']; +} + if (isset($_SESSION['uname'])) { $user = new user($_SESSION['uname']); if ($_SESSION['token'] != $user->getToken()) { @@ -47,14 +52,13 @@ if (isset($_SESSION['uname'])) { -