X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAuth.pm;h=087301a5eaabede0c0f0b5003111e2118808321b;hb=d89811fcc066fa5ffc6cc0848fd6fb4f11bdf6dd;hp=5cedbecf3aa103ece1cf204a757c60a04b5557b0;hpb=b513b1ef51a01f90bd2a234a69fae4f69013d0f3;p=kivitendo-erp.git diff --git a/SL/Auth.pm b/SL/Auth.pm index 5cedbecf3..087301a5e 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -13,6 +13,7 @@ use SL::Auth::DB; use SL::Auth::LDAP; use SL::User; +use SL::DBUpgrade2; use SL::DBUtils; use strict; @@ -187,7 +188,7 @@ sub dbconnect { $main::form->error($main::locale->text('The connection to the authentication database failed:') . "\n" . $DBI::errstr); } - $main::lxdebug->leave_sub(); + $main::lxdebug->leave_sub(2); return $self->{dbh}; } @@ -303,7 +304,7 @@ sub create_tables { $charset ||= Common::DEFAULT_CHARSET; $dbh->rollback(); - User->process_query($main::form, $dbh, 'sql/auth_db.sql', undef, $charset); + SL::DBUpgrade2->new(form => $::form)->process_query($dbh, 'sql/auth_db.sql', undef, $charset); $main::lxdebug->leave_sub(); } @@ -489,7 +490,7 @@ sub restore_session { if (!$cookie || $cookie->{is_expired} || ($cookie->{ip_address} ne $ENV{REMOTE_ADDR})) { $self->destroy_session(); $main::lxdebug->leave_sub(); - return SESSION_EXPIRED; + return $cookie ? SESSION_EXPIRED : SESSION_NONE; } $query = qq|SELECT sess_key, sess_value FROM auth.session_content WHERE session_id = ?|;