8000 [#3405] Tweaks thanks to @WouterJ and @xabbuh · symfony/symfony-docs@473f8c1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 473f8c1

Browse files
committed
[#3405] Tweaks thanks to @wouterj and @xabbuh
1 parent 1eefb1b commit 473f8c1

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

cookbook/security/_ircmaxwell_password-compat.rst.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
{
99
"require": {
10-
"...": "all the other dependencies...",
10+
...
1111
"ircmaxell/password-compat": "~1.0.3"
1212
}
13-
}
13+
}

cookbook/security/entity_provider.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,8 @@ address or username.
740740
Understanding serialize and how a User is Saved in the Session
741741
--------------------------------------------------------------
742742
743-
If you're curious about the importance of the ``serialize`` method inside
744-
the User class or how the User object is serialized or deserialized, then
743+
If you're curious about the importance of the ``serialize()`` method inside
744+
the ``User`` class or how the User object is serialized or deserialized, then
745745
this section is for you. If not, feel free to skip this.
746746
747747
Once the user is logged in, the entire User object is serialized into the
@@ -757,18 +757,17 @@ Even though this all happens automatically, there are a few important side-effec
757757
First, the :phpclass:`Serializable` interface and its ``serialize`` and ``unserialize``
758758
methods have been added to allow the ``User`` class to be serialized
759759
to the session. This may or may not be needed depending on your setup,
760-
but it's probably a good idea. Only the ``id`` needs to be serialized,
760+
but it's probably a good idea. In theory, only the ``id`` needs to be serialized,
761761
because the :method:`Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider::refreshUser`
762762
method refreshes the user on each request by using the ``id`` (as explained
763-
above). In practice, this means that the User object is reloaded from the
764-
database on each request using the ``id`` from the serialized object. This
765-
makes sure all of the User's data is fresh.
766-
763+
above). However in practice, this means that the User object is reloaded from
764+
the database on each request using the ``id`` from the serialized object.
765+
This makes sure all of the User's data is fresh.
767766
768767
Symfony also uses the ``username``, ``salt``, and ``password`` to verify
769768
that the User has not changed between requests. Failing to serialize
770769
these may cause you to be logged out on each request. If your User implements
771-
:class:`Symfony\\Component\\Security\\Core\\User\\EquatableInterface`,
770+
the :class:`Symfony\\Component\\Security\\Core\\User\\EquatableInterface`,
772771
then instead of these properties being checked, your ``isEqualTo`` method
773772
is simply called, and you can check whatever properties you want. Unless
774773
you understand this, you probably *won't* need to implement this interface

0 commit comments

Comments
 (0)
0