|
@@ -37,7 +37,7 @@ class Group extends Auth
|
|
}
|
|
}
|
|
|
|
|
|
# 创建账户
|
|
# 创建账户
|
|
- public function createUser($module, $data_id, $name, $mobile, $password)
|
|
|
|
|
|
+ public function createUser($module, $data_id, $name, $mobile, $password, $state = false)
|
|
{
|
|
{
|
|
if ($mobile && $password) {
|
|
if ($mobile && $password) {
|
|
$system = Dever::db('system', 'manage')->find(2);
|
|
$system = Dever::db('system', 'manage')->find(2);
|
|
@@ -47,6 +47,9 @@ class Group extends Auth
|
|
$db = Dever::db($system['user_table'], '', 'default', Dever::load('common', 'manage')->system($data));
|
|
$db = Dever::db($system['user_table'], '', 'default', Dever::load('common', 'manage')->system($data));
|
|
|
|
|
|
$info = $db->find(array('mobile' => $mobile));
|
|
$info = $db->find(array('mobile' => $mobile));
|
|
|
|
+ if ($state && $info) {
|
|
|
|
+ Dever::error('手机号' . $mobile . '已存在,请更换手机号');
|
|
|
|
+ }
|
|
|
|
|
|
$module = Dever::db('system_module', 'manage')->find(array('key' => $module, 'system' => 'group'));
|
|
$module = Dever::db('system_module', 'manage')->find(array('key' => $module, 'system' => 'group'));
|
|
$insert['name'] = $name;
|
|
$insert['name'] = $name;
|