Skip to content

Commit

Permalink
Merge pull request #268 from cgernert/patch-2
Browse files Browse the repository at this point in the history
Save new password, instead of saving the old one again
  • Loading branch information
mdmunir committed May 20, 2016
2 parents 58b3d02 + 44d765f commit f171177
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/form/ChangePassword.php
Expand Up @@ -54,7 +54,7 @@ public function change()
if ($this->validate()) {
/* @var $user User */
$user = Yii::$app->user->identity;
$user->setPassword($this->oldPassword);
$user->setPassword($this->newPassword);
$user->generateAuthKey();
if ($user->save()) {
return true;
Expand All @@ -63,4 +63,4 @@ public function change()

return false;
}
}
}

0 comments on commit f171177

Please sign in to comment.