Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit debd17d

Browse filesBrowse files
committed
Deprecated the AdvancedUserInterface
1 parent 903f302 commit debd17d
Copy full SHA for debd17d

File tree

1 file changed

+8
-4
lines changed
Filter options

1 file changed

+8
-4
lines changed

‎security/entity_provider.rst

Copy file name to clipboardExpand all lines: security/entity_provider.rst
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,9 @@ What do the serialize and unserialize Methods do?
173173
At the end of each request, the User object is serialized to the session.
174174
On the next request, it's unserialized. To help PHP do this correctly, you
175175
need to implement ``Serializable``. But you don't need to serialize everything:
176-
you only need a few fields (the ones shown above plus a few extra if you
177-
decide to implement :ref:`AdvancedUserInterface <security-advanced-user-interface>`).
178-
On each request, the ``id`` is used to query for a fresh ``User`` object
179-
from the database.
176+
you only need a few fields (the ones shown above plus a few extra if you added
177+
other important fields to your user entity). On each request, the ``id`` is used
178+
to query for a fresh ``User`` object from the database.
180179

181180
Want to know more? See :ref:`security-serialize-equatable`.
182181

@@ -326,6 +325,11 @@ and password ``admin`` (which has been encoded).
326325
Forbid Inactive Users (AdvancedUserInterface)
327326
---------------------------------------------
328327

328+
.. versionadded:: 4.1
329+
The ``AdvancedUserInterface`` class was deprecated in Symfony 4.1 and no
330+
alternative is provided. If you need this functionality in your application,
331+
add the ``AdvancedUserInterface`` methods to your own user class.
332+
329333
If a User's ``isActive`` property is set to ``false`` (i.e. ``is_active``
330334
is 0 in the database), the user will still be able to login to the site
331335
normally. This is easily fixable.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.