|
@@ -136,6 +136,8 @@ class Center extends Auth
|
|
|
'newpassword.require'=>'新密码必须'
|
|
|
]);
|
|
|
if ($data['password']==$data['newpassword']) $this->error('原密码与新密码一样');
|
|
|
+ $pass = DataUser::mk()->where('id',$this->uuid)->value('password');
|
|
|
+ if (md5($data['password'])!=$pass) $this->error('原密码验证错误');
|
|
|
if (DataUser::mk()->where(['id' => $this->uuid])->update(['password'=>md5($data['newpassword'])]) !== false) {
|
|
|
$this->success('更新密码成功!', $this->getUser());
|
|
|
} else {
|