From 02bec6bd8223b35938782b226d998fda1105c7d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 16 May 2011 17:35:57 +0200 Subject: [PATCH] =?utf8?q?Serverfehler=20beim=20L=C3=B6schen=20von=20Benut?= =?utf8?q?zern=20behoben.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Das globale $form kann im admin.pl Environment nicht auf die User DB connecten, also muss das von Hand gemacht werden. Conflicts: SL/Auth.pm --- SL/Auth.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SL/Auth.pm b/SL/Auth.pm index 8b8d859ae..347e95b08 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -437,6 +437,9 @@ sub delete_user { my $form = $main::form; + my %user = $self->read_user($login); + my $u_dbh = DBI->connect($user{dbconnect}, $user{dbuser}, $user{dbpasswd}); + my $dbh = $self->dbconnect(); $dbh->begin_work; @@ -449,8 +452,10 @@ sub delete_user { do_query($form, $dbh, qq|DELETE FROM auth.user_group WHERE user_id = ?|, $id); do_query($form, $dbh, qq|DELETE FROM auth.user_config WHERE user_id = ?|, $id); + do_query($form, $u_dbh, qq|UPDATE employee SET deleted = 't' WHERE login = ?|, $login); - $dbh->commit(); + $dbh->commit; + $u_dbh->commit; $main::lxdebug->leave_sub(); } -- 2.20.1