Skip to content

Commit 7325ec5

Browse files
committed
[#3307] Adding an additional note about deserialization issues
1 parent 962e204 commit 7325ec5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cookbook/security/entity_provider.rst

+7
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,13 @@ For this example, the first three methods will return ``true`` whereas the
399399
Now, if you try to authenticate as a user who's ``is_active`` database field
400400
is set to 0, you won't be allowed.
401401
402+
.. note::
403+
404+
When using the ``AdvancedUserInterface``, you should also add any of
405+
the properties used by these methods (like ``isActive``) to the ``serialize``
406+
method. If you *don't* do this, your user may not be deserialized correctly
407+
from the session on each request.
408+
402409
The next session will focus on how to write a custom entity provider
403410
to authenticate a user with their username or email address.
404411

0 commit comments

Comments
 (0)