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.

2 Answers 2

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.

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..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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