|
@@ -108,16 +108,16 @@ class Pcadmin extends Backend
|
|
|
|
|
|
$adminmobile = $params['mobile'];
|
|
|
if (!$adminmobile || !\think\Validate::regex($adminmobile, "^1\d{10}$")) {
|
|
|
- $this->error('手机号格式不正确');
|
|
|
+ abort(500,'手机号格式不正确');
|
|
|
}
|
|
|
$check = Db::name('pc_admin')->where('username',$adminmobile)->where('id','neq',$adminid)->find();
|
|
|
if(!empty($check)){
|
|
|
- $this->error('该手机号已被其他管理员注册');
|
|
|
+ abort(500,'该手机号已被其他管理员注册');
|
|
|
}
|
|
|
|
|
|
if (!empty($params['password'])) {
|
|
|
if (!\think\Validate::is($params['password'], "/^[\S]{6,30}$/")) {
|
|
|
- $this->error(__("Please input correct password"));
|
|
|
+ abort(500,__("Please input correct password"));
|
|
|
}
|
|
|
$params['salt'] = Random::alnum();
|
|
|
$params['password'] = md5(md5($params['password']) . $params['salt']);
|