浏览代码

can not remove user 0

tags/0.1.0
Robin Thoni 9 年前
父节点
当前提交
982d80d665
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10
    0
      src/Auth/Business/LuticateUsersBusiness.php

+ 10
- 0
src/Auth/Business/LuticateUsersBusiness.php 查看文件

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

正在加载...
取消
保存