Skip to content

Commit

Permalink
废弃createUser方法
Browse files Browse the repository at this point in the history
废弃createUser方法
  • Loading branch information
gmars committed Apr 19, 2019
1 parent 322b455 commit 9d083b9
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions src/Rbac.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,21 +319,6 @@ public function delUserRole($id)
return true;
}

/**
* @param array $data
* @return int|string
* @throws Exception
* 创建用户[建议在自己系统的业务逻辑中实现]
*/
public function createUser(array $data = [])
{
if (empty($data)) {
throw new Exception('参数错误');
}

return Db::name($this->userTable)->insert($data);
}

/**
* 获取用户权限并缓存
* @param $id
Expand Down Expand Up @@ -535,6 +520,16 @@ public function editRole($data)
{
throw new Exception('请使用createRole方法在data中传入主键,如果你得项目中依旧想使用此方法请安装v1.3.1版本');
}


/**
* @param array $data
* @return int|string
* @throws Exception
* 创建用户[建议在自己系统的业务逻辑中实现]
*/
public function createUser(array $data = [])
{
throw new Exception('该方法在新版本中已经废弃,因为用户表的差异比较大请大家自行实现');
}

}

0 comments on commit 9d083b9

Please sign in to comment.