summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Coevoet <stof@notk.org>2012-07-14 18:00:37 +0200
committerChristophe Coevoet <stof@notk.org>2012-07-14 18:00:37 +0200
commit671647a3a9fe3d13637f5db0f2bc411b9be0de2a (patch)
treeef3e6736ba9838584887595752a823bd3970cac9
parentf636a80f1f0fa4b8ff0ca390212bf89af14a07fb (diff)
downloadsymfony-security-671647a3a9fe3d13637f5db0f2bc411b9be0de2a.zip
symfony-security-671647a3a9fe3d13637f5db0f2bc411b9be0de2a.tar.gz
symfony-security-671647a3a9fe3d13637f5db0f2bc411b9be0de2a.tar.bz2
fixed the serialization of the SwitchUserRole
-rw-r--r--Core/Role/SwitchUserRole.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/Core/Role/SwitchUserRole.php b/Core/Role/SwitchUserRole.php
index c679584..3076f34 100644
--- a/Core/Role/SwitchUserRole.php
+++ b/Core/Role/SwitchUserRole.php
@@ -45,4 +45,22 @@ class SwitchUserRole extends Role
{
return $this->source;
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function serialize()
+ {
+ return serialize(array(parent::serialize(), $this->source));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function unserialize($serialized)
+ {
+ list($parent, $this->source) = unserialize($serialized);
+
+ parent::unserialize($parent);
+ }
}