Skip to content

Commit

Permalink
Merge pull request #404 from CWSpear/patch-1
Browse files Browse the repository at this point in the history
Make sure `password_confirmation` is being removed
  • Loading branch information
Zizaco committed Sep 10, 2014
2 parents 594fd79 + 1ee432a commit bdfbcff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Confide/UserValidator.php
Expand Up @@ -90,9 +90,6 @@ public function validatePassword(ConfideUserInterface $user)

// Hashes password and unset password_confirmation field
$user->password = $hash->make($user->password);
unset($user->password_confirmation);

return true;
} else {
$this->attachErrorMsg(
$user,
Expand All @@ -102,6 +99,8 @@ public function validatePassword(ConfideUserInterface $user)
return false;
}
}

unset($user->password_confirmation);

return true;
}
Expand Down

0 comments on commit bdfbcff

Please sign in to comment.