X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/38902b24ceed494a2936edfe4d72e8c48e15bce0..6f266e929ff3eaefc84c34b46fa452c50eecbcf4:/SL/Controller/LoginScreen.pm?ds=inline diff --git a/SL/Controller/LoginScreen.pm b/SL/Controller/LoginScreen.pm index e73224bcc..81ad8dd5c 100644 --- a/SL/Controller/LoginScreen.pm +++ b/SL/Controller/LoginScreen.pm @@ -34,12 +34,13 @@ sub action_logout { sub action_login { my ($self) = @_; - %::myconfig = $::form->{'{AUTH}login'} ? $::auth->read_user(login => $::form->{'{AUTH}login'}) : (); - %::myconfig = SL::Dispatcher::AuthHandler::User->new->handle(countrycode => $::myconfig{countrycode}); + my $login = $::form->{'{AUTH}login'} || $::auth->get_session_value('login'); + %::myconfig = $login ? $::auth->read_user(login => $login) : (); + SL::Dispatcher::AuthHandler::User->new->handle(countrycode => $::myconfig{countrycode}); $::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}); + $::request->{layout} = SL::Layout::Dispatcher->new(style => $user->{menustyle}); # if we get an error back, bale out my $result = $user->login($::form); @@ -118,7 +119,7 @@ sub error_state { } sub set_layout { - $::request->{layout} = SL::Controller::Layout->new(style => 'login'); + $::request->{layout} = SL::Layout::Dispatcher->new(style => 'login'); } 1;