function user_expire_user_load in User Expire 7
Same name and namespace in other branches
- 8 user_expire.module \user_expire_user_load()
Implements hook_user_load().
File
- ./
user_expire.module, line 52 - Main module file for User expire module.
Code
function user_expire_user_load($users) {
foreach ($users as $uid => $user) {
$query = db_select('user_expire', 'ue');
$expiration = $query
->condition('ue.uid', $uid)
->fields('ue', array(
'expiration',
))
->execute()
->fetchField();
if (!empty($expiration)) {
$user->expiration = $expiration;
}
}
}