$::lxdebug->enter_sub;
my $session_result = shift;
- $cgi = $::cgi;
$form = $::form;
$auth = $::auth;
$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 (!$::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->create_or_refresh_session();
+ delete $form->{password};
$form->{titlebar} .= " - $::myconfig{name} - $::myconfig{dbname}";
call_sub($::locale->findsub($action));
::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}} || '';
$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
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();