Skip to content

Commit a84acd8

Browse files
committed
[#3307] Adding an additional note about deserialization issues
(cherry picked from commit 7325ec5)
1 parent 45612ad commit a84acd8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cookbook/security/entity_provider.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,13 @@ For this example, the first three methods will return ``true`` whereas the
420420
Now, if you try to authenticate as a user who's ``is_active`` database field
421421
is set to 0, you won't be allowed.
422422
423+
.. note::
424+
425+
When using the ``AdvancedUserInterface``, you should also add any of
426+
the properties used by these methods (like ``isActive``) to the ``serialize``
427+
method. If you *don't* do this, your user may not be deserialized correctly
428+
from the session on each request.
429+
423430
The next session will focus on how to write a custom entity provider
424431
to authenticate a user with their username or email address.
425432

0 commit comments

Comments
 (0)