Skip to content

Commit 9d083b9

Browse files
committed
废弃createUser方法
废弃createUser方法
1 parent 322b455 commit 9d083b9

1 file changed

Lines changed: 11 additions & 16 deletions

File tree

src/Rbac.php

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -319,21 +319,6 @@ public function delUserRole($id)
319319
return true;
320320
}
321321

322-
/**
323-
* @param array $data
324-
* @return int|string
325-
* @throws Exception
326-
* 创建用户[建议在自己系统的业务逻辑中实现]
327-
*/
328-
public function createUser(array $data = [])
329-
{
330-
if (empty($data)) {
331-
throw new Exception('参数错误');
332-
}
333-
334-
return Db::name($this->userTable)->insert($data);
335-
}
336-
337322
/**
338323
* 获取用户权限并缓存
339324
* @param $id
@@ -535,6 +520,16 @@ public function editRole($data)
535520
{
536521
throw new Exception('请使用createRole方法在data中传入主键,如果你得项目中依旧想使用此方法请安装v1.3.1版本');
537522
}
538-
523+
524+
/**
525+
* @param array $data
526+
* @return int|string
527+
* @throws Exception
528+
* 创建用户[建议在自己系统的业务逻辑中实现]
529+
*/
530+
public function createUser(array $data = [])
531+
{
532+
throw new Exception('该方法在新版本中已经废弃,因为用户表的差异比较大请大家自行实现');
533+
}
539534

540535
}

0 commit comments

Comments
 (0)