1

Question:

In the context of Organic Groups API, is there a hook that fires when an group administrator adds or removes a user from the group (or when a user self joins or self-removes their account)?

Ultimately, I was hoping for a hook that was fired around og_group() and og_ungroup() as that's how I best understand the API so far.

3
+50

You can find all OG hooks here.

You already mentioned two of them, but for the sake of a complete answer here are the hooks fired on membership add/edit/delete:

Also, as memberships actually are entities you can also use all hooks used for saving and deleting entities, like hook_entity_update and hook_entity_delete. You can find them in this list.

| improve this answer | |
0

Well, this always seems to happen after offering a bounty. I stumbled upon these nifty hooks.

If anyone has a better idea, the bounty is still active..

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.