diff options
Diffstat (limited to 'src/Wallabag/UserBundle')
-rw-r--r-- | src/Wallabag/UserBundle/Entity/User.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php index d98ae76a..eb7774cd 100644 --- a/src/Wallabag/UserBundle/Entity/User.php +++ b/src/Wallabag/UserBundle/Entity/User.php | |||
@@ -25,7 +25,7 @@ use Wallabag\CoreBundle\Entity\Entry; | |||
25 | * @UniqueEntity("email") | 25 | * @UniqueEntity("email") |
26 | * @UniqueEntity("username") | 26 | * @UniqueEntity("username") |
27 | */ | 27 | */ |
28 | class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterface | 28 | class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterface, \Serializable |
29 | { | 29 | { |
30 | /** | 30 | /** |
31 | * @var int | 31 | * @var int |
@@ -240,4 +240,14 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf | |||
240 | 240 | ||
241 | return false; | 241 | return false; |
242 | } | 242 | } |
243 | |||
244 | public function serialize() | ||
245 | { | ||
246 | return serialize($this->id); | ||
247 | } | ||
248 | |||
249 | public function unserialize($serialized) | ||
250 | { | ||
251 | $this->id = unserialize($serialized); | ||
252 | } | ||
243 | } | 253 | } |