Revision 6ca9244c
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/Controller/LoginScreen.pm | ||
---|---|---|
65 | 65 |
# if we get an error back, bale out |
66 | 66 |
my $result = User->new(login => $::myconfig{login})->login($::form); |
67 | 67 |
|
68 |
# Database update available? |
|
69 |
::end_of_request() if -2 == $result; |
|
70 |
|
|
71 | 68 |
# Auth DB needs update? If so log the user out forcefully. |
72 |
if (-3 == $result) {
|
|
69 |
if (User::LOGIN_AUTH_DBUPDATE_AVAILABLE() == $result) {
|
|
73 | 70 |
$::auth->destroy_session; |
74 | 71 |
return $self->render('login_screen/auth_db_needs_update'); |
75 | 72 |
} |
76 | 73 |
|
74 |
# Basic client tables available? If not tell the user to create them |
|
75 |
# and log the user out forcefully. |
|
76 |
if (User::LOGIN_BASIC_TABLES_MISSING() == $result) { |
|
77 |
$::auth->destroy_session; |
|
78 |
return $self->render('login_screen/basic_tables_missing'); |
|
79 |
} |
|
80 |
|
|
81 |
# Database update available? |
|
82 |
::end_of_request() if User::LOGIN_DBUPDATE_AVAILABLE() == $result; |
|
83 |
|
|
77 | 84 |
# Other login errors. |
78 |
if (0 > $result) {
|
|
85 |
if (User::LOGIN_OK() != $result) {
|
|
79 | 86 |
$::auth->punish_wrong_login; |
80 | 87 |
return $self->show_login_form(error => $error); |
81 | 88 |
} |
Auch abrufbar als: Unified diff
Wenn DB existiert aber Basistabellen fehlen anständige Fehlermeldung anzeigen