Skip to content

Commit 68664a5

Browse files
committed
Documented the logout_on_user_change option
1 parent de3b614 commit 68664a5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

reference/configuration/security.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Each part will be explained in the next section.
141141
# See "Firewall Context" below for more details
142142
context: context_key
143143
stateless: false
144+
logout_on_user_change: false
144145
x509:
145146
provider: some_key_from_above
146147
remote_user:
@@ -450,6 +451,24 @@ The ``invalidate_session`` option allows to redefine this behavior. Set this
450451
option to ``false`` in every firewall and the user will only be logged out from
451452
the current firewall and not the other ones.
452453

454+
logout_on_user_change
455+
~~~~~~~~~~~~~~~~~~~~~
456+
457+
**type**: ``boolean`` **default**: ``false``
458+
459+
.. versionadded:: 3.4
460+
The ``logout_on_user_change`` option was introduced in Symfony 3.4.
461+
462+
If ``true`` this option makes Symfony to trigger a logout when the user has
463+
changed. Not doing that is deprecated, so this option should be set to ``true``
464+
to avoid getting deprecation messages.
465+
466+
The user is considered to have changed when the user class implements
467+
:class:`Symfony\\Component\\Security\\Core\\User\\EquatableInterface` and the
468+
``isEqualTo()`` method returns ``false``. Also, when any of the properties
469+
required by the :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface`
470+
(like the username, password or salt) changes.
471+
453472
.. _reference-security-ldap:
454473

455474
LDAP functionality

0 commit comments

Comments
 (0)