diff options
author | David de Boer <david@ddeboer.nl> | 2013-12-17 21:46:42 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2013-12-23 16:46:26 +0100 |
commit | 35c3590ba55c63d2684ff849b1f97fd4a688019c (patch) | |
tree | ff6784a953d584bb3f5fb3110f58e0bb3cf00905 /Core/Authentication/Token/AbstractToken.php | |
parent | 8f61147b69f8b6289ae94388d8cf523dad446273 (diff) | |
download | symfony-security-35c3590ba55c63d2684ff849b1f97fd4a688019c.zip symfony-security-35c3590ba55c63d2684ff849b1f97fd4a688019c.tar.gz symfony-security-35c3590ba55c63d2684ff849b1f97fd4a688019c.tar.bz2 |
Fix parent serialization of user object
Diffstat (limited to 'Core/Authentication/Token/AbstractToken.php')
-rw-r--r-- | Core/Authentication/Token/AbstractToken.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php index 1d65819..b994733 100644 --- a/Core/Authentication/Token/AbstractToken.php +++ b/Core/Authentication/Token/AbstractToken.php @@ -146,7 +146,14 @@ abstract class AbstractToken implements TokenInterface */ public function serialize() { - return serialize(array($this->user, $this->authenticated, $this->roles, $this->attributes)); + return serialize( + array( + is_object($this->user) ? clone $this->user : $this->user, + $this->authenticated, + $this->roles, + $this->attributes + ) + ); } /** |