function invite_load in Invite 5.2
Same name and namespace in other branches
- 5 invite.module \invite_load()
- 6.2 invite.module \invite_load()
- 7.4 invite.module \invite_load()
- 7.2 invite.module \invite_load()
Load an invite record for a tracking code.
Parameters
$code: A registration code to load the invite record for.
Return value
An invite record.
6 calls to invite_load()
- invite_cancel in ./
invite.module - Menu callback; display confirm form to delete an invitation.
- invite_controller in ./
invite.module - Menu callback; handle incoming requests for accepting an invite.
- invite_form_alter in ./
invite.module - Implementation of hook_form_alter().
- invite_load_from_session in ./
invite.module - Returns an invite record from an invite code stored in the user's session.
- invite_resend in ./
invite.module - Menu callback; resend an expired invite.
File
- ./
invite.module, line 330 - Allows your users to send and track invitations to join your site.
Code
function invite_load($code) {
$result = db_query("SELECT * FROM {invite} WHERE reg_code = '%s' AND canceled = 0", $code);
if ($invite = db_fetch_object($result)) {
$invite->inviter = user_load(array(
'uid' => $invite->uid,
));
$invite->data = (array) unserialize($invite->data);
}
return $invite;
}