function autologout_user_update in Automated Logout 7.2
Implements hook_user_update().
File
- ./
autologout.module, line 319 - Used to automagically log out a user after a preset time, AjK May 2006
Code
function autologout_user_update(&$edit, $account, $category) {
_autologout_debug("autologout_user_update()");
if (empty($account->uid)) {
return;
// UID 0 not appliciable
}
if (_autologout_user_in_by_user_role($account)) {
if (isset($edit['autologout'])) {
db_delete('autologout')
->condition('uid', $account->uid)
->execute();
db_insert('autologout')
->fields(array(
'uid' => $account->uid,
'setting' => $edit['autologout'],
))
->execute();
unset($edit['autologout']);
}
}
}