function invite_load in Invite 5
Same name and namespace in other branches
- 5.2 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.
5 calls to invite_load()
- invite_action in ./
invite.module - Menu callback; handle incoming requests for accepting an invite.
- invite_delete in ./
invite.module - Menu callback; display confirm form to delete an invitation.
- 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_user in ./
invite.module - Implementation of hook_user().
File
- ./
invite.module, line 492 - 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'", $code);
if ($invite = db_fetch_object($result)) {
$invite->inviter = user_load(array(
'uid' => $invite->uid,
));
$invite->data = (array) unserialize($invite->data);
}
return $invite;
}