protected function RestfulAuthenticationManager::setAccessTime in RESTful 7
Set the user's last access time.
Parameters
object $account: A user account.
See also
1 call to RestfulAuthenticationManager::setAccessTime()
- RestfulAuthenticationManager::getAccount in plugins/
authentication/ RestfulAuthenticationManager.php - Get the user account for the request.
File
- plugins/
authentication/ RestfulAuthenticationManager.php, line 220 - Contains RestfulAuthenticationManager.
Class
- RestfulAuthenticationManager
- @file Contains RestfulAuthenticationManager.
Code
protected function setAccessTime($account) {
// This logic is pulled directly from _drupal_session_write().
if ($account->uid && REQUEST_TIME - $account->access > variable_get('session_write_interval', 180)) {
db_update('users')
->fields(array(
'access' => REQUEST_TIME,
))
->condition('uid', $account->uid)
->execute();
}
}