X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Flogin.pl;h=94905e4edca453fe6b70bb23a838977df31d344c;hb=0a612d2fe7ec14c9ed3f7d0d036e1c63d3027f4f;hp=4d3679c784dea46cdc0c610de6ca44d76c4e2903;hpb=8d8fc8dd372e0883e386cb7cecf1483a6f73d1cb;p=kivitendo-erp.git diff --git a/bin/mozilla/login.pl b/bin/mozilla/login.pl index 4d3679c78..94905e4ed 100644 --- a/bin/mozilla/login.pl +++ b/bin/mozilla/login.pl @@ -65,12 +65,13 @@ sub run { %::myconfig = $auth->read_user($form->{login}) if ($form->{login}); $::locale = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode}; - if (!$::myconfig{login} || (SL::Auth::OK != $auth->authenticate($form->{login}, $form->{password}))) { + if (SL::Auth::OK != $auth->authenticate($::myconfig{login}, $form->{password})) { $form->{error_message} = $::locale->text('Incorrect username or password!'); login_screen(); } else { - $auth->set_session_value('login', $form->{login}, 'password', $form->{password}); + $auth->store_credentials_in_session(login => $form->{login}, password => $form->{password}); $auth->create_or_refresh_session(); + delete $form->{password}; $form->{titlebar} .= " - $::myconfig{name} - $::myconfig{dbname}"; call_sub($::locale->findsub($action)); @@ -111,6 +112,12 @@ sub 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(); @@ -183,6 +190,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();