From 4062efd022a39e9ce66693867ca5697d11f1c75d Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 26 Apr 2015 00:14:22 +0000 Subject: [PATCH] My point still stands --- _sakura/components/Users.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_sakura/components/Users.php b/_sakura/components/Users.php index 257e691..d2d49c6 100644 --- a/_sakura/components/Users.php +++ b/_sakura/components/Users.php @@ -284,7 +284,7 @@ class Users { return [0, 'USER_NOT_EXIST']; // Check if the user is deactivated - if(in_array(1, json_decode($userData['ranks'], true)) || in_array(0, json_decode($userData['ranks'], true)) || $userData['rank_main'] < 2) + if(in_array(1, json_decode($user['ranks'], true)) || in_array(0, json_decode($user['ranks'], true)) || $user['rank_main'] < 2) return [0, 'DEACTIVATED']; // Generate the verification key @@ -326,7 +326,7 @@ class Users { $user = Users::getUser(Session::$userId); // Check if the user is deactivated - if(in_array(1, json_decode($userData['ranks'], true)) || in_array(0, json_decode($userData['ranks'], true)) || $userData['rank_main'] < 2) + if(in_array(1, json_decode($user['ranks'], true)) || in_array(0, json_decode($user['ranks'], true)) || $user['rank_main'] < 2) return [0, 'DEACTIVATED']; // Check if the account is disabled @@ -453,7 +453,7 @@ class Users { $user = Database::fetch('users', false, ['id' => [$uid, '=']]); // User is already activated or doesn't even exist - if(!count($user) > 1 || !in_array(1, json_decode($userData['ranks'], true)) || !in_array(0, json_decode($userData['ranks'], true)) || $userData['rank_main'] > 1) + if(!count($user) > 1 || !in_array(1, json_decode($user['ranks'], true)) || !in_array(0, json_decode($user['ranks'], true)) || $user['rank_main'] > 1) return false; // Generate activation key @@ -497,7 +497,7 @@ class Users { return [0, 'USER_NOT_EXIST']; // Check if user is already activated - if(!in_array(1, json_decode($userData['ranks'], true)) || !in_array(0, json_decode($userData['ranks'], true)) || $userData['rank_main'] > 1) + if(!in_array(1, json_decode($user['ranks'], true)) || !in_array(0, json_decode($user['ranks'], true)) || $user['rank_main'] > 1) return [0, 'USER_ALREADY_ACTIVE']; // Set default values for activation