From 8398d525bdb83584541f3c9451d819c59ace1445 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 8 Nov 2015 00:22:01 +0100 Subject: [PATCH] =?UTF-8?q?fix=202=20of=20=E2=88=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _sakura/components/Users.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_sakura/components/Users.php b/_sakura/components/Users.php index 85c3346..42b8c0f 100755 --- a/_sakura/components/Users.php +++ b/_sakura/components/Users.php @@ -174,7 +174,7 @@ class Users // Check if the user has the required privs to log in if (Permissions::check('SITE', 'DEACTIVATED', $user->id(), 1)) { - return [0, 'NOT_ALLOWED', $user['user_id']]; + return [0, 'NOT_ALLOWED', $user->id()]; } // Create a new session @@ -188,7 +188,7 @@ class Users // User ID cookie setcookie( Config::getConfig('cookie_prefix') . 'id', - $user['user_id'], + $user->id(), time() + 604800, Config::getConfig('cookie_path'), Config::getConfig('cookie_domain') @@ -205,7 +205,7 @@ class Users } // Successful login! (also has a thing for the legacy password system) - return [1, 'LOGIN_SUCCESS', $user['user_id']]; + return [1, 'LOGIN_SUCCESS', $user->id()]; } // Logout and kill the session