Permalink
Browse files

Change the key for invalid passwords from "invalid" to

"invalid_password" to remove ambiguity.
  • Loading branch information...
1 parent 27b29af commit 6d81feacae8329cd0c65abe920ecd3fa2e8f2537 @bharat bharat committed Apr 17, 2010
@@ -63,7 +63,7 @@ private static function _form() {
$group->password("password")->label(t("Password"))->id("g-password")->class(null)
->callback("auth::validate_too_many_failed_auth_attempts")
->callback("user::valid_password")
- ->error_messages("invalid", t("Incorrect password"))
+ ->error_messages("invalid_password", t("Incorrect password"))
->error_messages(
"too_many_failed_auth_attempts",
t("Too many incorrect passwords. Try again later"));
@@ -167,7 +167,7 @@ private function _get_change_password_form($user) {
$group->password("old_password")->label(t("Old password"))->id("g-password")
->callback("auth::validate_too_many_failed_auth_attempts")
->callback("user::valid_password")
- ->error_messages("invalid", t("Incorrect password"))
+ ->error_messages("invalid_password", t("Incorrect password"))
->error_messages(
"too_many_failed_auth_attempts",
t("Too many incorrect passwords. Try again later"));
@@ -72,7 +72,7 @@ static function is_correct_password($user, $password) {
static function valid_password($password_input) {
if (!user::is_correct_password(identity::active_user(), $password_input->value)) {
- $password_input->add_error("invalid", 1);
+ $password_input->add_error("invalid_password", 1);
}
}

0 comments on commit 6d81fea

Please sign in to comment.