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