invite_cancel_account.module in Invite 5.2
Same filename and directory in other branches
Allows your users to terminate user accounts by withdrawing their invitation.
File
invite_cancel_account.moduleView 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
Name | Description |
---|---|
invite_cancel_account_invite | Implementation of hook_invite(). |