File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -282,17 +282,19 @@ associated with the user. It allows loading the user through the configured
282
282
}
283
283
}
284
284
285
- You can normalize the user identifier before using it (e.g. to ensure that variations like
286
- "john.doe", "John.Doe", or "JOHN.DOE" are treated as the same user).
287
- In Symfony applications, you can optionally pass a user identifier normalizer as the
288
- third argument to the ``UserBadge ``. This callable receives the ``$userIdentifier `` and must return a string.
285
+ Some applications normalize user identifiers before processing them. For example,
286
+ lowercasing identifiers helps treat values like "john.doe", "John.Doe", or
287
+ "JOHN.DOE" as equivalent in systems where identifiers are case-insensitive.
288
+
289
+ If needed, you can pass a normalizer as the third argument to ``UserBadge ``.
290
+ This callable receives the ``$userIdentifier `` and must return a string.
289
291
290
292
.. versionadded :: 7.3
291
293
292
294
Support for user identifier normalizers was introduced in Symfony 7.3.
293
295
294
- The example below uses a normalizer that converts usernames to
295
- a normalized, ASCII-only, lowercase format::
296
+ The example below uses a normalizer that converts usernames to a normalized,
297
+ ASCII-only, lowercase format::
296
298
297
299
// src/Security/NormalizedUserBadge.php
298
300
namespace App\Security;
You can’t perform that action at this time.
0 commit comments