Benutzerkonfiguration um Einstellungen zur Aufgabenliste erweitert.
[kivitendo-erp.git] / bin / mozilla / login.pl
index 2d96b54..7a4df5c 100644 (file)
@@ -33,6 +33,7 @@ use SL::User;
 use SL::Form;
 
 require "bin/mozilla/common.pl";
+require "bin/mozilla/todo.pl";
 
 # This is required because the am.pl in the root directory
 # is not scanned by locales.pl:
@@ -68,7 +69,13 @@ if (-f "bin/mozilla/$form->{login}_$form->{script}") {
 # window title bar, user info
 $form->{titlebar} = "Lx-Office " . $locale->text('Version') . " $form->{version}";
 
-if ($form->{action}) {
+my $action = $form->{action};
+
+if (!$action && $auth->{SESSION}->{login}) {
+  $action = 'login';
+}
+
+if ($action) {
   our %myconfig = $auth->read_user($form->{login}) if ($form->{login});
 
   if (!$myconfig{login} || (SL::Auth::OK != $auth->authenticate($form->{login}, $form->{password}, 0))) {
@@ -81,7 +88,7 @@ if ($form->{action}) {
   $auth->create_or_refresh_session();
 
   $form->{titlebar} .= " - $myconfig{name} - $myconfig{dbname}";
-  call_sub($locale->findsub($form->{action}));
+  call_sub($locale->findsub($action));
 
 } else {
   login_screen();
@@ -157,6 +164,8 @@ sub company_logo {
 
   $locale             =  new Locale $myconfig{countrycode}, "login" if ($language ne $myconfig{countrycode});
 
+  $form->{todo_list}  =  create_todo_list('login_screen' => 1) if (!$form->{no_todo_list});
+
   $form->{stylesheet} =  $myconfig{stylesheet};
   $form->{title}      =  $locale->text('About');
 
@@ -182,3 +191,4 @@ sub show_error {
 
   exit;
 }
+