Skip to content

Commit 77da851

Browse files
committed
Merge pull request #1936 from XWB/patch-1
Fix User serialization
2 parents 1499cb9 + 8728a6d commit 77da851

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Model/User.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ public function addRole($role)
149149
/**
150150
* Serializes the user.
151151
*
152-
* The serialized data have to contain the fields used by the equals method and the username.
152+
* The serialized data have to contain the fields used during check for
153+
* changes and the id.
153154
*
154155
* @return string
155156
*/
@@ -165,6 +166,10 @@ public function serialize()
165166
$this->credentialsExpired,
166167
$this->enabled,
167168
$this->id,
169+
$this->expiresAt,
170+
$this->credentialsExpireAt,
171+
$this->email,
172+
$this->emailCanonical,
168173
));
169174
}
170175

@@ -189,7 +194,11 @@ public function unserialize($serialized)
189194
$this->locked,
190195
$this->credentialsExpired,
191196
$this->enabled,
192-
$this->id
197+
$this->id,
198+
$this->expiresAt,
199+
$this->credentialsExpireAt,
200+
$this->email,
201+
$this->emailCanonical
193202
) = $data;
194203
}
195204

0 commit comments

Comments
 (0)