function invite_notify in Invite 5.2
Same name and namespace in other branches
- 6.2 invite.module \invite_notify()
- 7.2 invite.module \invite_notify()
Displays a notification message when an invited user has registered.
Parameters
$uid: The user id to check accepted invitations for.
1 call to invite_notify()
- invite_menu in ./
invite.module - Implementation of hook_menu().
File
- ./
invite.module, line 231 - Allows your users to send and track invitations to join your site.
Code
function invite_notify($uid) {
$result = db_query('SELECT invitee FROM {invite_notifications} WHERE uid = %d', $uid);
while ($row = db_fetch_object($result)) {
$account = user_load(array(
'uid' => $row->invitee,
'status' => 1,
));
if ($account) {
drupal_set_message(t('!user (@email) has joined @site-name!', array(
'!user' => theme('username', $account),
'@email' => $account->mail,
'@site-name' => variable_get('site_name', t('Drupal')),
)));
db_query("DELETE FROM {invite_notifications} WHERE uid = %d AND invitee = %d", $uid, $row->invitee);
}
}
}