Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3ab26ffc

Von Sven Schöling vor etwa 12 Jahren hinzugefügt

  • ID 3ab26ffcd0c8bfbf08508624c9ea07fbc6b4352a
  • Vorgänger 075f1eab
  • Nachfolger 4a12c839

Bei Loginfehlern das Menü nicht mitrendern

Unterschiede anzeigen:

SL/Controller/LoginScreen.pm
19 19
  return if $self->_redirect_to_main_script_if_already_logged_in;
20 20

  
21 21
  # Otherwise show the login form.
22
  $self->render('login_screen/user_login', { no_menu => 1 });
22
  $self->render('login_screen/user_login', { no_menu => 1 }, error => error_state($::form->{error}));
23 23
}
24 24

  
25 25
sub action_logout {
......
108 108
  return 1;
109 109
}
110 110

  
111
sub error_state {
112
  return {
113
    session  => $::locale->text('The session is invalid or has expired.'),
114
    password => $::locale->text('Incorrect password!'),
115
  }->{$_[0]};
116
}
117

  
111 118
1;
SL/Dispatcher.pm
81 81
  $::form->{error}         = $::locale->text('The session is invalid or has expired.') if ($error_type eq 'session');
82 82
  $::form->{error}         = $::locale->text('Incorrect password!')                    if ($error_type eq 'password');
83 83

  
84
  $::form->header;
84
  $::form->header(no_menu => 1);
85 85
  print $::form->parse_html_template($template, \%params);
86 86
  $::lxdebug->leave_sub;
87 87

  
......
225 225
      ::run($session_result);
226 226

  
227 227
    } else {
228
      show_error('login_screen/user_login', 'session') if SL::Auth::SESSION_EXPIRED == $session_result;
228
      if (SL::Auth::SESSION_EXPIRED == $session_result) {
229
        print $::request->{cgi}->redirect('controller.pl?action=LoginScreen/user_login&error=session');
230
      }
229 231

  
230 232
      my %auth_result = $self->{auth_handler}->handle(
231 233
        routing_type => $routing_type,
SL/Dispatcher/AuthHandler/User.pm
31 31
  my $self = shift;
32 32

  
33 33
  $::auth->punish_wrong_login;
34
  SL::Dispatcher::show_error('login_screen/user_login', 'password', @_);
34
  print $::request->{cgi}->redirect('controller.pl?action=LoginScreen/user_login&error=password');
35 35
}
36 36

  
37 37
1;

Auch abrufbar als: Unified diff