public User::setLastAccessTime($timestamp)
Sets the UNIX timestamp when the user last accessed the site..
Parameters
int $timestamp: Timestamp of the last access.
Return value
\Drupal\user\UserInterface The called user entity.
Overrides UserInterface::setLastAccessTime
File
- core/modules/user/src/Entity/User.php, line 251
Class
- User
- Defines the user entity class.
Namespace
Drupal\user\Entity
Code
public function setLastAccessTime($timestamp) { $this->get('access')->value = $timestamp; return $this; }
Please login to continue.