function user_prune_cron in User Prune 7
Same name and namespace in other branches
- 8 user_prune.module \user_prune_cron()
Passing saved variables to user_prune_delete on cron run. Deleting users.
File
- ./
user_prune.module, line 617 - Module API The main module file. Implementing forms and functions.
Code
function user_prune_cron() {
// Make sure the cron was turned on under settings.
if (variable_get('user_prune_cron_checkbox', FALSE) == TRUE) {
$config = array();
$config['user_prune_time_year'] = variable_get('user_prune_time_year', 0);
$config['user_prune_time_month'] = variable_get('user_prune_time_month', 0);
$config['user_prune_time_day'] = variable_get('user_prune_time_day', 0);
$config['user_prune_time_hour'] = variable_get('user_prune_time_hour', 0);
$config['user_prune_time_minute'] = variable_get('user_prune_time_minute', 0);
$config['user_prune_never_logged_in'] = variable_get('user_prune_never_logged_in', 0);
$config['user_prune_user_status'] = variable_get('user_prune_user_status', 'all');
$config['user_prune_prune_per_run'] = variable_get('user_prune_prune_per_run', '10');
$config['user_prune_user_roles_checkbox'] = variable_get('user_prune_user_roles_checkbox');
$config['user_prune_no_comment'] = variable_get('user_prune_no_comment');
$config['user_prune_no_node'] = variable_get('user_prune_no_node');
$config['user_prune_no_subscriptions'] = variable_get('user_prune_no_subscriptions', 0);
$config['user_prune_no_og'] = variable_get('user_prune_no_og', 0);
$config['user_prune_no_entityform'] = variable_get('user_prune_no_entityform', 0);
$config['user_prune_no_tmgmt'] = variable_get('user_prune_no_tmgmt', 0);
$config['user_prune_cancel_method'] = variable_get('user_prune_cancel_method', 0);
user_prune_delete($config, TRUE);
}
}