You are here

function invite_action in Invite 5

Menu callback; handle incoming requests for accepting an invite.

1 string reference to 'invite_action'
invite_menu in ./invite.module
Implementation of hook_menu().

File

./invite.module, line 467
Allows your users to send and track invitations to join your site.

Code

function invite_action() {
  global $user;
  if (!$user->uid) {

    // User not logged in
    $invite = invite_load(arg(2));

    // Check for a valid invite code
    if (_invite_validate($invite)) {
      $_SESSION[INVITE_SESSION_NAME] = $invite->reg_code;
      drupal_goto('user/register');
    }
  }
  drupal_goto();
}