X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDispatcher%2FAuthHandler%2FUser.pm;h=acdf29c5ca427c44bb89b2943f339e6a0d7181d3;hb=630c1ae7ea6477846e6f03263262a7ffef670caf;hp=3748dc1107d85b970484c64391760aa49f3dd998;hpb=2a496ad85e9117b7cfaaa315b208f478eba30ffd;p=kivitendo-erp.git diff --git a/SL/Dispatcher/AuthHandler/User.pm b/SL/Dispatcher/AuthHandler/User.pm index 3748dc110..acdf29c5c 100644 --- a/SL/Dispatcher/AuthHandler/User.pm +++ b/SL/Dispatcher/AuthHandler/User.pm @@ -26,7 +26,9 @@ sub handle { return $self->_error(%param) unless $::myconfig{login}; $::locale = Locale->new($::myconfig{countrycode}); - $::request->{layout} = SL::Layout::Dispatcher->new(style => $::myconfig{menustyle}); + $::request->{layout} = $::request->is_mobile + ? SL::Layout::Dispatcher->new(style => 'mobile') + : SL::Layout::Dispatcher->new(style => $::myconfig{menustyle}); my $ok = $::auth->is_api_token_cookie_valid; $ok ||= $::form->{'{AUTH}login'} && (SL::Auth::OK() == $::auth->authenticate($::myconfig{login}, $::form->{'{AUTH}password'})); @@ -43,10 +45,10 @@ sub handle { } sub _error { - my $self = shift; + my ($self, %param) = @_; $::auth->punish_wrong_login; - $::dispatcher->handle_login_error(error => 'password'); + $::dispatcher->handle_login_error(%param, error => 'password'); return 0; }