X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Flogin.pl;h=3c90891183c444a67254de8fc1169ad0adf8e1d5;hb=b81f2b8fd88c28f96f49fbe50e94276384d0d511;hp=528c4eb4b6d918f05bb37f8e6c85b781b03379d1;hpb=1c385c602908735c3be266b1470b301050650fd3;p=kivitendo-erp.git diff --git a/bin/mozilla/login.pl b/bin/mozilla/login.pl index 528c4eb4b..3c9089118 100644 --- a/bin/mozilla/login.pl +++ b/bin/mozilla/login.pl @@ -45,7 +45,6 @@ sub run { $::lxdebug->enter_sub; my $session_result = shift; - $cgi = $::cgi; $form = $::form; $auth = $::auth; @@ -62,7 +61,7 @@ sub run { $action = 'login'; } if ($action) { - %::myconfig = $auth->read_user($form->{login}) if ($form->{login}); + %::myconfig = $auth->read_user(login => $form->{login}) if ($form->{login}); $::locale = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode}; if (SL::Auth::OK != $auth->authenticate($::myconfig{login}, $form->{password})) { @@ -107,21 +106,27 @@ sub login { ::end_of_request(); } - my $user = new User $form->{login}; + my $user = User->new(login => $form->{login}); # if we get an error back, bale out my $result; if (($result = $user->login($form)) <= -1) { + if ($result == -3) { + show_error('login/auth_db_needs_update'); + $::auth->destroy_session; + ::end_of_request(); + } + ::end_of_request() if $result == -2; login_screen($::locale->text('Incorrect username or password!')); ::end_of_request(); } - my %style_to_script_map = ( 'v3' => 'v3', - 'neu' => 'new', - 'v4' => 'v4', - 'xml' => 'XML', - ); + my %style_to_script_map = ( + v3 => 'v3', + neu => 'new', + v4 => 'v4', + ); my $menu_script = $style_to_script_map{$user->{menustyle}} || ''; @@ -163,7 +168,7 @@ sub company_logo { $form->{todo_list} = create_todo_list('login_screen' => 1) if (!$form->{no_todo_list}); $form->{stylesheet} = $myconfig{stylesheet}; - $form->{title} = $::locale->text('Lx-Office'); + $form->{title} = $::locale->text('kivitendo'); $form->{interface} = $::dispatcher->interface_type; # create the logo screen @@ -184,6 +189,7 @@ sub show_error { print $form->parse_html_template($template); # $form->parse_html_template('login/auth_db_unreachable'); + # $form->parse_html_template('login/auth_db_needs_update'); # $form->parse_html_template('login/authentication_pl_missing'); ::end_of_request();