Users->delete: delete relations as well

This commit is contained in:
Birte Kristina Friesel 2023-07-19 09:17:19 +02:00
parent 2fecf8b662
commit 86ddfe5c97
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -569,6 +569,8 @@ sub delete {
$res{trwl} = $db->delete( 'traewelling', { user_id => $uid } );
$res{lt} = $db->delete( 'localtransit', { user_id => $uid } );
$res{password} = $db->delete( 'pending_passwords', { user_id => $uid } );
$res{relations} = $db->delete( 'relations',
[ { subject_id => $uid }, { object_id => $uid } ] );
$res{users} = $db->delete( 'users', { id => $uid } );
for my $key ( keys %res ) {