summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
+ }
}