You are here

public function User::setLastAccessTime in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/src/Entity/User.php \Drupal\user\Entity\User::setLastAccessTime()

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 256
Contains \Drupal\user\Entity\User.

Class

User
Defines the user entity class.

Namespace

Drupal\user\Entity

Code

public function setLastAccessTime($timestamp) {
  $this
    ->get('access')->value = $timestamp;
  return $this;
}