You are here

function invite_withdraw in Invite 7.2

Menu callback; display confirm form to withdraw an invitation.

Parameters

$form_satate: A keyed array containing the current state of the form.

$origin: A string denoting the orginating status page to return the user to afterwards.

1 string reference to 'invite_withdraw'
invite_menu in ./invite.module
Implements hook_menu().

File

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

Code

function invite_withdraw($form, &$form_state, $invite) {
  global $user;
  $form['invite'] = array(
    '#type' => 'value',
    '#value' => $invite,
  );
  $description = !$invite->joined && $invite->expiry > REQUEST_TIME ? t("The invitee won't be able to register any more using this invitation.") . ' ' : '';
  return confirm_form($form, t('Are you sure you want to withdraw the invitation to %email?', array(
    '%email' => $invite->email,
  )), $_REQUEST['destination'], $description . t('This action cannot be undone.'), t('Withdraw'), t('Cancel'));
}