You are here

invite_cancel_account.module in Invite 5

Same filename and directory in other branches
  1. 5.2 invite_cancel_account.module
  2. 6.2 invite_cancel_account.module

Allows your users to terminate user accounts by withdrawing their invitation.

File

invite_cancel_account.module
View source
<?php

/**
 * @file
 * Allows your users to terminate user accounts by withdrawing their
 * invitation.
 */

/**
 * Implementation of hook_invite().
 *
 * Withdrawing an invitation leads to termination of invited user's account.
 */
function invite_cancel_account_invite($op, $args) {
  switch ($op) {
    case 'cancel':
      if (user_access('withdraw accepted invitations')) {
        if ($account = user_load(array(
          'mail' => $args['email'],
        ))) {
          user_delete(array(), $account->uid);
        }
      }
      break;
  }
}

Functions

Namesort descending Description
invite_cancel_account_invite Implementation of hook_invite().