Skip to content

Commit

Permalink
Save new password, instead of saving the old one again
Browse files Browse the repository at this point in the history
  • Loading branch information
cgernert committed May 17, 2016
1 parent 58b3d02 commit 44d765f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/form/ChangePassword.php
Original file line number Diff line number Diff line change
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 44d765f

Please sign in to comment.