Delete orphaned Group_Members records after deleting a Member

This commit is contained in:
JorisDebonnet 2018-02-27 19:47:26 +01:00 committed by GitHub
parent 1973f87c4b
commit 3e0984db49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -946,8 +946,9 @@ class Member extends DataObject
{
parent::onAfterDelete();
//prevent orphaned records remaining in the DB
// prevent orphaned records remaining in the DB
$this->deletePasswordLogs();
$this->Groups()->removeAll();
}
/**