{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/6829","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/6829/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/6829/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/6829/events","html_url":"https://github.com/yiisoft/yii2/issues/6829","id":54001019,"number":6829,"title":"YII 2 BUG in ResetPasswordForm Model Advance Template and how to fix it","user":{"login":"woshka","id":9154074,"avatar_url":"https://avatars.githubusercontent.com/u/9154074?v=3","gravatar_id":"","url":"https://api.github.com/users/woshka","html_url":"https://github.com/woshka","followers_url":"https://api.github.com/users/woshka/followers","following_url":"https://api.github.com/users/woshka/following{/other_user}","gists_url":"https://api.github.com/users/woshka/gists{/gist_id}","starred_url":"https://api.github.com/users/woshka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woshka/subscriptions","organizations_url":"https://api.github.com/users/woshka/orgs","repos_url":"https://api.github.com/users/woshka/repos","events_url":"https://api.github.com/users/woshka/events{/privacy}","received_events_url":"https://api.github.com/users/woshka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-11T19:05:41Z","updated_at":"2015-01-12T08:23:12Z","closed_at":null,"body":"Hello,\r\n\r\nThere is a bug in ResetPasswordForm.php which has a problem for reseting a new password that will not work\r\n\r\nThe following Code in this model must be changed\r\n\r\n    public function resetPassword()\r\n    {\r\n        $user = $this->_user;\r\n        $user->password = $this->password;\r\n        $user->removePasswordResetToken();\r\n\r\n        return $user->save();\r\n    }\r\n\r\n\r\n\r\nCorrect form is as the following:\r\n\r\n\r\n\r\n        public function resetPassword()\r\n    {\r\n        $user = $this->_user;\r\n        $user->password = $user->setPassword($this->password);\r\n        $user->removePasswordResetToken();\r\n\r\n        return $user->save();\r\n    }"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/69539544","html_url":"https://github.com/yiisoft/yii2/issues/6829#issuecomment-69539544","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/6829","id":69539544,"user":{"login":"a-komarev","id":1849174,"avatar_url":"https://avatars.githubusercontent.com/u/1849174?v=3","gravatar_id":"","url":"https://api.github.com/users/a-komarev","html_url":"https://github.com/a-komarev","followers_url":"https://api.github.com/users/a-komarev/followers","following_url":"https://api.github.com/users/a-komarev/following{/other_user}","gists_url":"https://api.github.com/users/a-komarev/gists{/gist_id}","starred_url":"https://api.github.com/users/a-komarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-komarev/subscriptions","organizations_url":"https://api.github.com/users/a-komarev/orgs","repos_url":"https://api.github.com/users/a-komarev/repos","events_url":"https://api.github.com/users/a-komarev/events{/privacy}","received_events_url":"https://api.github.com/users/a-komarev/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T08:23:12Z","updated_at":"2015-01-12T08:23:12Z","body":"But by default there is no `password` field (there is only `password_hash` field) and if you will call a method setPassword manually password will be hashed twice."}}