diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php
index 979819f..c5cac1c 100644
--- a/core/modules/user/src/Entity/User.php
+++ b/core/modules/user/src/Entity/User.php
@@ -251,7 +251,7 @@ public function getCreatedTime() {
    * {@inheritdoc}
    */
   public function getLastAccessedTime() {
-    return $this->get('access')->value;
+    return (int) $this->get('access')->value;
   }
 
   /**
