diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-04-30 10:46:46 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-04-30 10:46:46 +0200 |
commit | 4ad1a1d20e52f7aa4b1ae2b7cc84c83c584d6725 (patch) | |
tree | 6789585c98a334938219d0c9aae0c7f947393e65 /lib/Travelynx/Controller/Account.pm | |
parent | 0226eba60ac14809f357240636a6a7151ef1ab1d (diff) |
Move invalid input errors into common sub-template
Diffstat (limited to 'lib/Travelynx/Controller/Account.pm')
-rw-r--r-- | lib/Travelynx/Controller/Account.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Travelynx/Controller/Account.pm b/lib/Travelynx/Controller/Account.pm index 5f06f2d..259fb9e 100644 --- a/lib/Travelynx/Controller/Account.pm +++ b/lib/Travelynx/Controller/Account.pm @@ -190,7 +190,7 @@ sub delete { ) ) { - $self->render( 'account', invalid => 'password' ); + $self->render( 'account', invalid => 'deletion password' ); return; } $self->flag_user_deletion( $self->current_user->{id} ); @@ -293,7 +293,8 @@ sub request_password_reset { my $uid = $self->get_uid_by_name_and_mail( $name, $email ); if ( not $uid ) { - $self->render( 'recover_password', invalid => 'credentials' ); + $self->render( 'recover_password', + invalid => 'recovery credentials' ); return; } @@ -360,7 +361,7 @@ sub request_password_reset { return; } if ( not $self->verify_password_token( $id, $token ) ) { - $self->render( 'recover_password', invalid => 'token' ); + $self->render( 'recover_password', invalid => 'recovery token' ); return; } if ( $password ne $password2 ) { @@ -428,7 +429,7 @@ sub recover_password { $self->render('set_password'); } else { - $self->render( 'recover_password', invalid => 'token' ); + $self->render( 'recover_password', invalid => 'recovery token' ); } } |