Most changes of state in the invite process already have hooks, however the actual acceptance does not.

This small patch adds a module_invoke_all('invite', 'accept) to _invite_accept() for other modules to tie into after an invite has actually been accepted.

CommentFileSizeAuthor
invite-accept-hook.patch726 bytesblakehall

Comments

christianchristensen’s picture

I think the change from invited to accepted is termed as 'escalate' in the hook_invite in the $op function argument... the return args are:
// $args['invitee']: The user account object of the person who was invited.
// $args['inviter']: The user account object of the person who did the inviting.
// $args['roles']: An array of roles the invited person has been escalated to.
I think the full doc for the hook is in the readme.txt of the module "-- INVITE API --" :)

I hope this helps!

YK85’s picture

would this in any way help #622152: Rules Integration

smk-ka’s picture

Status: Needs review » Closed (won't fix)

Well, rules support would be nice on its own, but as christian said 'accept' is dubbed 'escalate' in invite (for historical reasons). Unless you think this should be changed at all costs I'm closing this issue.