diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-03-09 08:40:46 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-03-09 08:40:46 +0100 |
commit | 0f51f406618eba4f04799fc0a4e6ad7660fe5e27 (patch) | |
tree | eb6f31d035305e5aca33113d58b8faa2b7d93a05 /index.pl | |
parent | 844a95f77f7bfca74264ae6dc062094bc8622f6a (diff) |
show separate errors for 'invalid credentials' and 'not confirmed yet'
Diffstat (limited to 'index.pl')
-rwxr-xr-x | index.pl | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -923,7 +923,13 @@ post '/login' => sub { $self->redirect_to('/'); } else { - $self->render( 'login', invalid => 'credentials' ); + my $data = $self->get_user_password($user); + if ( $data and $data->{status} == 0 ) { + $self->render( 'login', invalid => 'confirmation' ); + } + else { + $self->render( 'login', invalid => 'credentials' ); + } } } }; |