function ginvite_accept_callback in Group 7
Act upon accepting a group invitation from the user page.
See also
1 string reference to 'ginvite_accept_callback'
- ginvite_menu in modules/
ginvite/ ginvite.router.inc - Implements hook_menu().
File
- modules/
ginvite/ pages/ ginvite.inc, line 89 - Group member invite callback and pages.
Code
function ginvite_accept_callback($account, Group $group) {
$group_membership = $group
->getMember($account->uid);
$group_membership->status = 'active';
$group_membership
->save();
drupal_set_message(t('You have accepted the group invitation.'));
drupal_goto("user/{$account->uid}/group/invite");
}