function invite_user_insert in Invite 7.4
Same name and namespace in other branches
- 8 invite.module \invite_user_insert()
- 7.2 invite.module \invite_user_insert()
Implements hook_user_insert().
File
- ./
invite.module, line 796
Code
function invite_user_insert(&$edit, $account, $category) {
$invite = invite_load_from_session();
if ($invite && $invite
->status() == INVITE_VALID) {
$invite->invitee = $account->uid;
$invite->joined = REQUEST_TIME;
$invite->status = INVITE_USED;
entity_save('invite', $invite);
if (isset($_SESSION)) {
unset($_SESSION[INVITE_SESSION_CODE]);
}
}
}