X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/3880d6570d3ee1d0f26e54887defcf49f359b9a9..4a12c839937370488b8b8a40bef376e7cb0a2ce6:/SL/Controller/LoginScreen.pm diff --git a/SL/Controller/LoginScreen.pm b/SL/Controller/LoginScreen.pm index aace43a19..9d0e94bc3 100644 --- a/SL/Controller/LoginScreen.pm +++ b/SL/Controller/LoginScreen.pm @@ -19,7 +19,7 @@ sub action_user_login { return if $self->_redirect_to_main_script_if_already_logged_in; # Otherwise show the login form. - $self->render('login_screen/user_login', { no_menu => 1 }); + $self->render('login_screen/user_login', { no_menu => 1 }, error => error_state($::form->{error})); } sub action_logout { @@ -38,6 +38,7 @@ sub action_login { $::form->{login} = $::myconfig{login}; $::locale = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode}; my $user = User->new(login => $::myconfig{login}); + $::request->{layout} = SL::Controller::Layout->new(style => $user->{menustyle}); # if we get an error back, bale out my $result = $user->login($::form); @@ -108,4 +109,11 @@ sub _redirect_to_main_script_if_already_logged_in { return 1; } +sub error_state { + return { + session => $::locale->text('The session is invalid or has expired.'), + password => $::locale->text('Incorrect password!'), + }->{$_[0]}; +} + 1;