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

Deprecated the AdvancedUserInterface #9279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Deprecated the AdvancedUserInterface
  • Loading branch information
javiereguiluz committed Feb 16, 2018
commit debd17d185c675788cac4a7fbf08c0ca8cb0f853
12 changes: 8 additions & 4 deletions 12 security/entity_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,9 @@ What do the serialize and unserialize Methods do?
At the end of each request, the User object is serialized to the session.
On the next request, it's unserialized. To help PHP do this correctly, you
need to implement ``Serializable``. But you don't need to serialize everything:
you only need a few fields (the ones shown above plus a few extra if you
decide to implement :ref:`AdvancedUserInterface <security-advanced-user-interface>`).
On each request, the ``id`` is used to query for a fresh ``User`` object
from the database.
you only need a few fields (the ones shown above plus a few extra if you added
other important fields to your user entity). On each request, the ``id`` is used
to query for a fresh ``User`` object from the database.

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

Expand Down Expand Up @@ -326,6 +325,11 @@ and password ``admin`` (which has been encoded).
Forbid Inactive Users (AdvancedUserInterface)
---------------------------------------------

.. versionadded:: 4.1
The ``AdvancedUserInterface`` class was deprecated in Symfony 4.1 and no
alternative is provided. If you need this functionality in your application,
add the ``AdvancedUserInterface`` methods to your own user class.

If a User's ``isActive`` property is set to ``false`` (i.e. ``is_active``
is 0 in the database), the user will still be able to login to the site
normally. This is easily fixable.
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.