Better cleanup on user delete - Delete pending space invites

This commit is contained in:
Lucas Bartholemy 2014-02-20 17:27:25 +01:00
parent 24c39b68f0
commit 0f2a0582e6

View File

@ -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;
}