Revision f1a6f401
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/Controller/Admin.pm | ||
---|---|---|
157 | 157 |
sub action_delete_user { |
158 | 158 |
my ($self) = @_; |
159 | 159 |
|
160 |
my @clients = @{ $self->user->clients || [] }; |
|
161 |
|
|
160 | 162 |
if (!$self->user->delete) { |
161 | 163 |
flash('error', t8('The user could not be deleted.')); |
162 | 164 |
$self->edit_user_form(title => t8('Edit User')); |
163 | 165 |
return; |
164 | 166 |
} |
165 | 167 |
|
168 |
# Flag corresponding entries in 'employee' as deleted. |
|
169 |
foreach my $client (@clients) { |
|
170 |
my $dbh = $client->dbconnect(AutoCommit => 1) || next; |
|
171 |
$dbh->do(qq|UPDATE employee SET deleted = TRUE WHERE login = ?|, undef, $self->user->login); |
|
172 |
$dbh->disconnect; |
|
173 |
} |
|
174 |
|
|
166 | 175 |
flash_later('info', t8('The user has been deleted.')); |
167 | 176 |
$self->redirect_to(action => 'show'); |
168 | 177 |
} |
Auch abrufbar als: Unified diff
Admin-Controller: gelöschte User in allen Mandanten-Employee-Tabellen als gelöscht flaggen