public function User::setLastLoginTime in Drupal 8
Same name and namespace in other branches
- 9 core/modules/user/src/Entity/User.php \Drupal\user\Entity\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;
}