Unify preSave and postSave logic for memberships.

Created on 5 March 2024, 11 months ago

Problem/Motivation

Currently, we have code in GroupRelationship::postSave() that is unique to memberships. We shouldn't privilege one plugin over the others. We should move this to hook_ENTITY_TYPE_update and hook_ENTITY_TYPE_insert.

While we're at it, we introduced some safety checks on GroupMembershipTrait in #3132084: Add/Remove group role for a user programmatically and should move that to hook_ENTITY_TYPE_presave here so that they run even if the API (addRole) is bypassed.

📌 Task
Status

Active

Version

3.3

Component

Code

Created by

🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024