function invite_validate in Invite 7.2
Same name and namespace in other branches
- 5.2 invite.module \invite_validate()
- 6.2 invite.module \invite_validate()
- 7.4 invite.module \invite_validate()
Checks the status of an invite.
Parameters
$invite: An invite object as returned by invite_load().
Return value
The constant corresponding to the status of the invite.
3 calls to invite_validate()
- invite_accept in ./
invite.pages.inc - Menu callback; handle incoming requests for accepting an invite.
- invite_form_alter in ./
invite.module - Implements hook_form_alter().
- invite_user_register_access in ./
invite.module - Access callback; determine access to user registration form.
File
- ./
invite.module, line 524 - Allows your users to send and track invitations to join your site.
Code
function invite_validate($invite) {
if (!$invite || $invite->canceled != 0) {
return INVITE_WITHDRAWN;
}
elseif ($invite->joined != 0) {
return INVITE_USED;
}
elseif ($invite->expiry < REQUEST_TIME) {
return INVITE_EXPIRED;
}
else {
return INVITE_VALID;
}
}