Skip to content

Commit 942bb00

Browse files
feat: delete tags when deleting profile
1 parent bd9bfec commit 942bb00

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

php-classes/Laddr/PeopleRequestHandler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ protected static function onBeforeRecordDestroyed(\ActiveRecord $Person)
7676
$ProjectMembership->destroy();
7777
}
7878

79+
// delete tags
80+
foreach ($Person->Tags as $Tag) {
81+
$Tag->destroy();
82+
}
83+
7984
// delete comments
8085
foreach ($Person->Comments as $Comment) {
8186
$Comment->destroy();

0 commit comments

Comments
 (0)