fix #9356 [Security] Logger should manipulate the user reloaded from provider
bug #9826 fix #9356 [Security] Logger should manipulate the user reloaded from provider (matthieuauger)

This PR was submitted for the 2.2 branch but it was merged into the 2.3 branch instead (closes #9826).

Discussion
----------

fix #9356 [Security] Logger should manipulate the user reloaded from provider

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9356
| License       | MIT

PR for well explained ticket #9356 by nikolajosipovic

Any feedback welcome, this is my first PR to symfony

Commits
-------

17b0b34 fix #9356 [Security] Logger should manipulate the user reloaded from provider