mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-04-26 23:49:14 -04:00
Change the key for invalid passwords from "invalid" to
"invalid_password" to remove ambiguity.
This commit is contained in:
@@ -63,7 +63,7 @@ class Reauthenticate_Controller extends Controller {
|
||||
$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 @@ class Users_Controller extends Controller {
|
||||
$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 @@ class user_Core {
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user