/[drupal]/contributions/modules/invite/invite_cancel_account.module
ViewVC logotype

Contents of /contributions/modules/invite/invite_cancel_account.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Wed Aug 20 13:26:12 2008 UTC (15 months, 1 week ago) by smk
Branch: MAIN
CVS Tags: DRUPAL-6--2-0-ALPHA1, HEAD
Branch point for: DRUPAL-6--2
Changes since 1.2: +3 -3 lines
File MIME type: text/x-php
Synced HEAD with DRUPAL-5--2 branch.
1 <?php
2 // $Id: invite_cancel_account.module,v 1.1.2.1.2.1 2008/03/04 20:49:20 smk Exp $
3
4 /**
5 * @file
6 * Allows your users to terminate user accounts by withdrawing their
7 * invitation.
8 */
9
10 /**
11 * Implementation of hook_invite().
12 *
13 * Withdrawing an invitation leads to termination of invited user's account.
14 */
15 function invite_cancel_account_invite($op, $args) {
16 switch ($op) {
17 case 'cancel':
18 if (user_access('withdraw accepted invitations')) {
19 if ($account = user_load(array('mail' => $args['email']))) {
20 user_delete(array(), $account->uid);
21 }
22 }
23 break;
24 }
25 }
26

  ViewVC Help
Powered by ViewVC 1.1.2