Преглед на файлове

Merge branch 'opensky-hotfix/remember-me-token-fix' into security

Johannes Schmitt преди 14 години
родител
ревизия
4c7aa343d3
променени са 1 файла, в които са добавени 17 реда и са изтрити 0 реда
  1. 17 0
      src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php

+ 17 - 0
src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php

@@ -66,4 +66,21 @@ class RememberMeToken extends Token
     {
         $this->persistentToken = $persistentToken;
     }
+
+
+    /**
+     * {@inheritdoc}
+     */
+    public function serialize()
+    {
+        return serialize(array($this->user, $this->credentials, $this->authenticated, $this->roles, $this->immutable, $this->providerKey, $this->attributes, $this->key));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function unserialize($serialized)
+    {
+        list($this->user, $this->credentials, $this->authenticated, $this->roles, $this->immutable, $this->providerKey, $this->attributes, $this->key) = unserialize($serialized);
+    }
 }