function User::setLastAccessTime
Sets the UNIX timestamp when the user last accessed the site..
Parameters
int $timestamp: Timestamp of the last access.
Return value
$this The called user entity.
Overrides UserInterface::setLastAccessTime
File
-
core/
modules/ user/ src/ Entity/ User.php, line 282
Class
- User
- Defines the user entity class.
Namespace
Drupal\user\EntityCode
public function setLastAccessTime($timestamp) {
$this->get('access')->value = $timestamp;
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.