Browse Source

can not remove user 0

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

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

120
         return LuticateUsersLightDbo::fromUserDbo($user);
120
         return LuticateUsersLightDbo::fromUserDbo($user);
121
     }
121
     }
122
 
122
 
123
+    public static function deleteById($id)
124
+    {
125
+        if ($id != 0) {
126
+            $res = static::getDataAccess()->deleteById($id);
127
+            if (!$res)
128
+                self::notFound(static::getResourceName() . " not found");
129
+        }
130
+        return true;
131
+    }
132
+
123
     public static function add($username, $email, $firstname, $lastname, $password)
133
     public static function add($username, $email, $firstname, $lastname, $password)
124
     {
134
     {
125
         $hash = self::hashPassword($password);
135
         $hash = self::hashPassword($password);

Loading…
Cancel
Save