File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ focus on the most important methods that come from the
138
138
*/
139
139
public function equals(UserInterface $user)
140
140
{
141
- return $this->username === $user->getUsername ();
141
+ return $this->id === $user->getId ();
142
142
}
143
143
144
144
/**
@@ -176,7 +176,7 @@ interface forces the class to implement the six following methods:
176
176
177
177
For more details on each of these, see :class: `Symfony\\ Component\\ Security\\ Core\\ User\\ UserInterface `.
178
178
179
- To keep it simple, the ``equals() `` method just compares the ``username `` field
179
+ To keep it simple, the ``equals() `` method just compares the ``id `` field
180
180
but it's also possible to do more checks depending on the complexity of your
181
181
data model. On the other hand, the ``eraseCredentials() `` method remains empty
182
182
for the purposes of this tutorial.
You can’t perform that action at this time.
0 commit comments