summaryrefslogtreecommitdiff
path: root/core/classes/authentication/Token/UserToken.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/classes/authentication/Token/UserToken.php')
-rw-r--r--core/classes/authentication/Token/UserToken.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/classes/authentication/Token/UserToken.php b/core/classes/authentication/Token/UserToken.php
index 6ce2eb6..520d4ad 100644
--- a/core/classes/authentication/Token/UserToken.php
+++ b/core/classes/authentication/Token/UserToken.php
@@ -15,16 +15,28 @@ class UserToken implements UserTokenInterface
*/
private $user;
+
public function __construct(UserInterface $user)
{
$this->user = $user;
}
+
+ /** getUser
+ *
+ */
public function getUser(): UserInterface
{
return $this->user;
}
+
+ /** serialize()
+ *
+ * serializes the user structure (with user's property values)
+ * ... then it will be saved into session[DEFAULT_PREFIX_KEY]
+ *
+ */
public function serialize(): string
{
return serialize($this);