Browse Source

logout method

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
4505931c1a
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      src/Auth/Business/LuticateUsersBusiness.php

+ 11
- 0
src/Auth/Business/LuticateUsersBusiness.php View File

67
         return $user;
67
         return $user;
68
     }
68
     }
69
 
69
 
70
+    /**
71
+     * @param $user LuticateUsersDbo
72
+     * @return bool
73
+     */
74
+    public static function logout($user)
75
+    {
76
+        $user->setSalt(self::getSalt());
77
+        LuticateUsersDataAccess::editById($user->getId(), $user);
78
+        return true;
79
+    }
80
+
70
     public static function add($username, $email, $password)
81
     public static function add($username, $email, $password)
71
     {
82
     {
72
         $hash = self::hashPassword($password);
83
         $hash = self::hashPassword($password);

Loading…
Cancel
Save