修复添加管理员报错

master
chenzhi 5 years ago
parent d8acd44d08
commit 29d204bf97

@ -109,6 +109,7 @@ class UcenterMemberModel extends Model{
'second_pwd' => $second_pwd, 'second_pwd' => $second_pwd,
'email' => $email, 'email' => $email,
'mobile' => $mobile, 'mobile' => $mobile,
'openid_sign'=>''
); );
//验证手机 //验证手机
@ -117,7 +118,11 @@ class UcenterMemberModel extends Model{
if($data = $this->create($data)){ if($data = $this->create($data)){
$data['username'] = $username; $data['username'] = $username;
$data['email'] = $email; $data['email'] = $email;
$status = M('UcenterMember', 'sys_')->data($data)->add(); try {
$status = M('UcenterMember', 'sys_')->data($data)->add();
} catch (\Throwable $th) {
$status = false;
}
$uid = 0; $uid = 0;
if ($status) { if ($status) {
$uid = M()->getLastInsID(); $uid = M()->getLastInsID();

Loading…
Cancel
Save