aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Entity
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-06-26 13:36:53 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-10-08 13:27:17 +0200
commite4b46f77ef2984b33f4dff0efea0585c7ab0cfbf (patch)
treecdfb6738aba0705a6e5d7cac22260509ffb19de8 /src/Wallabag/UserBundle/Entity
parentd9b0673dbb1138e805e039610cef893e49abe3d8 (diff)
downloadwallabag-e4b46f77ef2984b33f4dff0efea0585c7ab0cfbf.tar.gz
wallabag-e4b46f77ef2984b33f4dff0efea0585c7ab0cfbf.tar.zst
wallabag-e4b46f77ef2984b33f4dff0efea0585c7ab0cfbf.zip
work
Diffstat (limited to 'src/Wallabag/UserBundle/Entity')
-rw-r--r--src/Wallabag/UserBundle/Entity/User.php12
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 */
28class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterface 28class 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}