You are here

function invite_withdraw_submit in Invite 7.2

Submit handler to withdraw an invitation.

File

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

Code

function invite_withdraw_submit($form, &$form_state) {
  $invite = $form_state['values']['invite'];
  db_update('invite')
    ->fields(array(
    'canceled' => 1,
  ))
    ->condition('reg_code', $invite->reg_code)
    ->execute();
  drupal_set_message(t('Invitation to %email has been withdrawn.', array(
    '%email' => $invite->email,
  )));

  // Notify other modules.
  module_invoke_all('invite_withdraw', $invite);
}