function user_expire_process_per_user_expiration in User Expire 7
Same name and namespace in other branches
- 8 user_expire.module \user_expire_process_per_user_expiration()
Expires users who have an expiration that has passed.
1 call to user_expire_process_per_user_expiration()
- user_expire_cron in ./
user_expire.module - Implements hook_cron().
File
- ./
user_expire.module, line 204 - Main module file for User expire module.
Code
function user_expire_process_per_user_expiration() {
// Retrieve list of all users to be disabled.
$query = db_select('user_expire', 'ue');
$expired_users = $query
->condition('ue.expiration', REQUEST_TIME, '<=')
->fields('ue', array(
'uid',
))
->execute()
->fetchCol();
$accounts = array();
foreach ($expired_users as $uid) {
$accounts[] = user_load($uid);
}
user_expire_expire_users($accounts);
}