/[drupal]/contributions/modules/logintoboggan/logintoboggan.module
ViewVC logotype

Diff of /contributions/modules/logintoboggan/logintoboggan.module

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

revision 1.170, Wed Oct 21 18:11:47 2009 UTC revision 1.171, Wed Oct 21 19:04:20 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: logintoboggan.module,v 1.169 2009/10/20 22:10:04 thehunmonkgroup Exp $  // $Id: logintoboggan.module,v 1.170 2009/10/21 18:11:47 thehunmonkgroup Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 23  Line 23 
23   */   */
24    
25  /**  /**
26   * Implementation of hook_cron().   * Implement hook_cron().
27   */   */
28  function logintoboggan_cron() {  function logintoboggan_cron() {
29    // If set password is enabled, and a purge interval is set, check for    // If set password is enabled, and a purge interval is set, check for
# Line 42  function logintoboggan_cron() { Line 42  function logintoboggan_cron() {
42        $purged_users = array();        $purged_users = array();
43        // Delete the users from the system.        // Delete the users from the system.
44        foreach ($accounts as $account) {        foreach ($accounts as $account) {
45          user_delete(array(), $account->uid);          user_cancel(array(), $account->uid, 'user_cancel_delete');
46          $purged_users[] = check_plain($account->name);          $purged_users[] = check_plain($account->name);
47        }        }
48    
49        // Log the purged users.        // Log the purged users.
50        if (!empty($purged_users)) {        if (!empty($purged_users)) {
51          watchdog('logintoboggan', 'Purged the following unvalidated users: !purged_users', array('!purged_users' => theme('item_list', $purged_users)));          batch_process(drupal_get_destination());
52            watchdog('logintoboggan', 'Purged the following unvalidated users: !purged_users', array('!purged_users' => theme('item_list', array('items' => $purged_users))));
53        }        }
54      }      }
55    }    }
56  }  }
57    
58  /**  /**
59   * Implementation of hook_help().   * Implement hook_help().
60   */   */
61  function logintoboggan_help($path, $arg) {  function logintoboggan_help($path, $arg) {
62    switch ($path) {    switch ($path) {
# Line 663  function logintoboggan_user_edit_validat Line 664  function logintoboggan_user_edit_validat
664  }  }
665    
666  /**  /**
667   * Implementation of hook_init()   * Implement hook_init()
668   *   *
669   * @ingroup logintoboggan_core   * @ingroup logintoboggan_core
670   */   */
# Line 702  function _logintoboggan_user_roles_alter Line 703  function _logintoboggan_user_roles_alter
703  }  }
704    
705  /**  /**
706   * Implementation of hook_menu()   * Implement hook_menu()
707   *   *
708   * @ingroup logintoboggan_core   * @ingroup logintoboggan_core
709   */   */
# Line 1354  function logintoboggan_main_settings_sub Line 1355  function logintoboggan_main_settings_sub
1355  }  }
1356    
1357  /**  /**
1358   * Implementation of hook_mail_alter().   * Implement hook_mail_alter().
1359   */   */
1360  function logintoboggan_mail_alter(&$message) {  function logintoboggan_mail_alter(&$message) {
1361    if ($message['id'] == 'user_register_pending_approval_admin') {    if ($message['id'] == 'user_register_pending_approval_admin') {

Legend:
Removed from v.1.170  
changed lines
  Added in v.1.171

  ViewVC Help
Powered by ViewVC 1.1.2