You are here

function invite_cancel_submit in Invite 5.2

Same name and namespace in other branches
  1. 6.2 invite.module \invite_cancel_submit()

Submit handler to delete an invitation.

File

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

Code

function invite_cancel_submit($form_id, $form_values) {
  $invite = $form_values['invite'];
  db_query("UPDATE {invite} SET canceled = 1 WHERE reg_code = '%s'", $invite->reg_code);
  drupal_set_message(t('Invitation to %email has been withdrawn.', array(
    '%email' => $invite->email,
  )));

  // Notify other modules.
  $args = array(
    'inviter' => $invite->inviter,
    'email' => $invite->email,
    'code' => $invite->reg_code,
  );
  module_invoke_all('invite', 'cancel', $args);
}