Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

How to add role on user during the session

$
0
0

I just updated Symfony 4.3 to 4.4 and since, when I modify the role of my user after my login page, this one is disconnected

Before I did this in my controller:

$this->getUser()->setRoles(['ROLE_MODERATEUR']);

Everything went well, there was no disconnection.

But since version 4.4, the user systematically loses his session.

Does anyone have a solution to bring me to resolve my concerns?

Thank you in advance.


Viewing all articles
Browse latest Browse all 3925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>