* Modify user api bug.

This commit is contained in:
宋辰轩
2022-11-16 16:27:09 +08:00
parent c65ab1e6c7
commit cdb40c8190
2 changed files with 5 additions and 4 deletions
-2
View File
@@ -547,8 +547,6 @@ class userModel extends model
->remove('new, password1, password2, groups,verifyPassword, passwordStrength,passwordLength')
->get();
/* Fix bug for api requests using json. */
if($this->app->getViewType() == 'json') $this->post->verifyPassword = md5(md5($this->post->verifyPassword) . $this->session->rand);
if(empty($_POST['verifyPassword']) or $this->post->verifyPassword != md5($this->app->user->password . $this->session->rand))
{
dao::$errors['verifyPassword'][] = $this->lang->user->error->verifyPassword;