Browse Source

login permission fix

tags/0.1.0
Robin Thoni 8 years ago
parent
commit
a9f26c010b
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      src/Auth/Business/LuticateBusiness.php

+ 4
- 4
src/Auth/Business/LuticateBusiness.php View File

@@ -46,13 +46,13 @@ class LuticateBusiness
46 46
                 $user_id = $data[LuticateUsersBusiness::KEY_USER_ID];
47 47
                 $salt = $data[LuticateUsersBusiness::KEY_SALT];
48 48
                 $user = LuticateUsersBusiness::getById($user_id);
49
-                if ($user->getSalt() == $salt) {
50
-                    self::$_currentUser = $user;
49
+                if ($user->getSalt() != $salt) {
50
+                    $user = null;
51 51
                 }
52 52
             }
53 53
         }
54
-        if (is_null(self::$_currentUser)) {
55
-            self::$_currentUser = LuticateUsersBusiness::getById(0);
54
+        if (is_null($user)) {
55
+            $user = LuticateUsersBusiness::getById(0);
56 56
         }
57 57
 
58 58
         if (!LuticatePermissionsBusiness::getUserPermission($user->getId(), LuticatePermissions::USER_LOGIN))

Loading…
Cancel
Save