User::getLastAccessedTime

public User::getLastAccessedTime()

The timestamp when the account last accessed the site.

A value of 0 means the user has never accessed the site.

Return value

int Timestamp of the last access.

Overrides AccountInterface::getLastAccessedTime

File

core/modules/user/src/Entity/User.php, line 244

Class

User
Defines the user entity class.

Namespace

Drupal\user\Entity

Code

public function getLastAccessedTime() {
  return $this->get('access')->value;
}
doc_Drupal
2016-10-29 09:52:06
Comments
Leave a Comment

Please login to continue.