function hook_invite_target_roles in Invite 7.2
Alter roles that are being added to the user who has just accepted an invitation and created an account.
This hook is invoked after the target roles for the new registrant have been determined, but before they have been assigned to the user. Modify $roles to change what roles will be added to the user.
Parameters
$roles: An array of role IDs that will be added to the user.
$invite: The invite that the user has accepted.
$account: The new account that is being created. This object comes from hook_user_presave, and is not a fully populated user object.
File
- ./
invite.api.php, line 67 - API documentation for Invite module.
Code
function hook_invite_target_roles(&$roles, $invite, $account) {
}