|
|
|
@ -42,7 +42,7 @@ class UserController extends AdminController
|
|
|
|
|
$map['nickname'] = array('like', '%' . (string)$nickname . '%');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$list = $this->lists('Member', $map);
|
|
|
|
|
$list = $this->lists('Member', $map,"uid desc",true,true);
|
|
|
|
|
int_to_string($list);
|
|
|
|
|
|
|
|
|
|
$this->checkListOrCountAuthRestMap($map,[]);
|
|
|
|
@ -282,16 +282,16 @@ class UserController extends AdminController
|
|
|
|
|
if ($password != $repassword) {
|
|
|
|
|
$this->error('管理员密码和确认密码不一致!');
|
|
|
|
|
}
|
|
|
|
|
$usernameUser = M('UcenterMember', 'sys_')->field('username')->where(['username' => $username])->find();
|
|
|
|
|
$usernameUser = SM('UcenterMember', 'sys_')->field('username')->where(['username' => $username])->find();
|
|
|
|
|
if (!empty($usernameUser)) {
|
|
|
|
|
$this->error('用户名已存在!');
|
|
|
|
|
}
|
|
|
|
|
$emailUser = M('UcenterMember', 'sys_')->field('id')->where(['email' => $email])->find();
|
|
|
|
|
$emailUser = SM('UcenterMember', 'sys_')->field('id')->where(['email' => $email])->find();
|
|
|
|
|
if (!empty($emailUser)) {
|
|
|
|
|
$this->error('邮箱已存在!');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$moblieUser = M('UcenterMember', 'sys_')->field('id')->where(['mobile' => $_POST['mobile']])->find();
|
|
|
|
|
$moblieUser = SM('UcenterMember', 'sys_')->field('id')->where(['mobile' => $_POST['mobile']])->find();
|
|
|
|
|
|
|
|
|
|
if (!empty($moblieUser)) {
|
|
|
|
|
$this->error('手机号码已存在!');
|
|
|
|
@ -304,8 +304,8 @@ class UserController extends AdminController
|
|
|
|
|
$user = array('uid' => $uid,'real_name'=>$real_name, 'nickname' => $username, 'status' => 1,"birthday"=>date('Y-m-d',time()));
|
|
|
|
|
$data['uid'] = $uid;
|
|
|
|
|
$data['group_id'] = I('auth');
|
|
|
|
|
M('auth_group_access')->data($data)->add();
|
|
|
|
|
if (!M('Member')->add($user)) {
|
|
|
|
|
SM('auth_group_access')->data($data)->add();
|
|
|
|
|
if (!SM('Member')->add($user)) {
|
|
|
|
|
$this->error('用户添加失败!');
|
|
|
|
|
} else {
|
|
|
|
|
//操作日志
|
|
|
|
@ -322,7 +322,7 @@ class UserController extends AdminController
|
|
|
|
|
$this->error($this->showRegError($uid));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$list = D('AuthGroup')->where(array('status' => 1))->select();
|
|
|
|
|
$list = SM('AuthGroup')->where(array('status' => 1))->select();
|
|
|
|
|
$this->assign('lists', $list);
|
|
|
|
|
$this->meta_title = '新增管理员';
|
|
|
|
|
|
|
|
|
@ -502,7 +502,6 @@ class UserController extends AdminController
|
|
|
|
|
$this->assign("authid", $au["group_id"]);
|
|
|
|
|
$this->assign("houtai", $au["houtai"]);
|
|
|
|
|
$list = D('AuthGroup')->where(array('status' => 1))->select();
|
|
|
|
|
dd(D('AuthGroup'));
|
|
|
|
|
$username = $_POST['username'];
|
|
|
|
|
$password = $_POST['password'];
|
|
|
|
|
$this->assign('lists', $list);
|
|
|
|
|