mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Better cleanup on user delete - Delete pending space invites
This commit is contained in:
parent
24c39b68f0
commit
0f2a0582e6
@ -57,6 +57,11 @@ class SpaceModule extends CWebModule {
|
||||
$membership->space->removeMember($user->id);
|
||||
}
|
||||
|
||||
// Cancel all space invites by the user
|
||||
foreach (UserSpaceMembership::model()->findAllByAttributes(array('originator_user_id' => $user->id, 'status'=>UserSpaceMembership::STATUS_INVITED)) as $membership) {
|
||||
$membership->space->removeMember($membership->user_id);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user