I am learning Symfony 4 and i want to change role of somes users to ROLE_ADMIN.
How can do this with a database ?
I tried to change it manually in database but it doesn't work...
(a:1:{i:0;s:9:"ROLE_USER";} -> a:1:{i:0;s:10:"ROLE_ADMIN";})
Thank you ;)
To promote users you can use command lines tools for FosUser:
php bin/console fos:user:promote testuser --super
php bin/console fos:user:promote testuser ROLE_ADMIN
check the doc here: https://symfony.com/doc/current/bundles/FOSUserBundle/command_line_tools.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.