Sfoglia il codice sorgente

can not remove user 0

tags/0.1.0
Robin Thoni 9 anni fa
parent
commit
982d80d665
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. 10
    0
      src/Auth/Business/LuticateUsersBusiness.php

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

@@ -120,6 +120,16 @@ class LuticateUsersBusiness extends LuBusiness {
120 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 133
     public static function add($username, $email, $firstname, $lastname, $password)
124 134
     {
125 135
         $hash = self::hashPassword($password);

Loading…
Annulla
Salva