Pārlūkot izejas kodu

can not remove user 0

tags/0.1.0
Robin Thoni 9 gadus atpakaļ
vecāks
revīzija
982d80d665
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. 10
    0
      src/Auth/Business/LuticateUsersBusiness.php

+ 10
- 0
src/Auth/Business/LuticateUsersBusiness.php Parādīt failu

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);

Notiek ielāde…
Atcelt
Saglabāt