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'}));
}
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;
}