Merge branch 'master' into develop
正在显示
2 个修改的文件
包含
10 行增加
和
10 行删除
| @@ -46,20 +46,20 @@ class IndexController extends BaseController | @@ -46,20 +46,20 @@ class IndexController extends BaseController | ||
| 46 | */ | 46 | */ |
| 47 | public function editPassword(){ | 47 | public function editPassword(){ |
| 48 | $this->request->validate([ | 48 | $this->request->validate([ |
| 49 | - 'oldPassword'=>'required', | 49 | +// 'oldPassword'=>'required', |
| 50 | 'password' => 'required', | 50 | 'password' => 'required', |
| 51 | 'confirm'=>'required', | 51 | 'confirm'=>'required', |
| 52 | ], [ | 52 | ], [ |
| 53 | - 'oldPassword.required' => '请输入原密码', | 53 | +// 'oldPassword.required' => '请输入原密码', |
| 54 | 'password.required' => '请输入新密码', | 54 | 'password.required' => '请输入新密码', |
| 55 | 'confirm.required' => '请再次输入新密码', | 55 | 'confirm.required' => '请再次输入新密码', |
| 56 | ]); | 56 | ]); |
| 57 | //查询员密码是否正确 | 57 | //查询员密码是否正确 |
| 58 | $managerModel = new Manage(); | 58 | $managerModel = new Manage(); |
| 59 | $info = $managerModel->read(['id'=>$this->manage['id']]); | 59 | $info = $managerModel->read(['id'=>$this->manage['id']]); |
| 60 | - if(!Hash::check($this->param['oldPassword'], $info['password'])){ | ||
| 61 | - $this->response('原密码错误',Code::USER_REGISTER_ERROE); | ||
| 62 | - } | 60 | +// if(!Hash::check($this->param['oldPassword'], $info['password'])){ |
| 61 | +// $this->response('原密码错误',Code::USER_REGISTER_ERROE); | ||
| 62 | +// } | ||
| 63 | if($this->param['password'] != $this->param['confirm']){ | 63 | if($this->param['password'] != $this->param['confirm']){ |
| 64 | $this->response('两次密码不一致'); | 64 | $this->response('两次密码不一致'); |
| 65 | } | 65 | } |
| @@ -126,20 +126,20 @@ class ComController extends BaseController | @@ -126,20 +126,20 @@ class ComController extends BaseController | ||
| 126 | */ | 126 | */ |
| 127 | public function edit_info(){ | 127 | public function edit_info(){ |
| 128 | $this->request->validate([ | 128 | $this->request->validate([ |
| 129 | - 'oldPassword'=>'required', | 129 | +// 'oldPassword'=>'required', |
| 130 | 'password' => 'required', | 130 | 'password' => 'required', |
| 131 | 'confirm'=>'required', | 131 | 'confirm'=>'required', |
| 132 | ], [ | 132 | ], [ |
| 133 | - 'oldPassword.required' => '请输入原密码', | 133 | +// 'oldPassword.required' => '请输入原密码', |
| 134 | 'password.required' => '请输入新密码', | 134 | 'password.required' => '请输入新密码', |
| 135 | 'confirm.required' => '请再次输入新密码', | 135 | 'confirm.required' => '请再次输入新密码', |
| 136 | ]); | 136 | ]); |
| 137 | //查询员密码是否正确 | 137 | //查询员密码是否正确 |
| 138 | $userModel = new User(); | 138 | $userModel = new User(); |
| 139 | $info = $userModel->read(['id'=>$this->user['id']]); | 139 | $info = $userModel->read(['id'=>$this->user['id']]); |
| 140 | - if($info['password'] != base64_encode(md5($this->param['oldPassword']))){ | ||
| 141 | - $this->response('原密码错误',Code::USER_ERROR); | ||
| 142 | - } | 140 | +// if($info['password'] != base64_encode(md5($this->param['oldPassword']))){ |
| 141 | +// $this->response('原密码错误',Code::USER_ERROR); | ||
| 142 | +// } | ||
| 143 | if($this->param['password'] != $this->param['confirm']){ | 143 | if($this->param['password'] != $this->param['confirm']){ |
| 144 | $this->response('两次密码不一致'); | 144 | $this->response('两次密码不一致'); |
| 145 | } | 145 | } |
-
请 注册 或 登录 后发表评论