**Symfony version(s) affected**: 5.0.5 **Description** Impersonalisation not working if we use Uuid for username in Postgresql database **How to reproduce** use uuid type instead string in postgresql database for username **Possible Solution** generate à uuid string instead of pure random string line 152 of SwitchUserListener.php **Additional context** the error is SQLSTATE[22P02]: Invalid text representation