php - FOSUserBundle Reset password not working with Impersonating user config -


i'm using symfony 3.3 fosuserbundle 2.0. can't reset password feature work. go request resetting page, type email or username , click on submit , redirects me login page without error shown in view. looked @ log , gives me error :

security.debug: access denied, user not authenticated; redirecting authentication entry point. {"exception":"[object] (symfony\\component\\security\\core\\exception\\accessdeniedexception(code: 403): access denied. @ .../vendor/symfony/symfony/src/symfony/component/security/http/firewall/switchuserlistener.php:125)"} [] 

security.yml :

security: encoders:     fos\userbundle\model\userinterface: sha512  {...}  firewalls:     main:         pattern: ^/         form_login:             provider: fos_userbundle             csrf_token_generator: security.csrf.token_manager             default_target_path: /verifinit         logout:       true         anonymous:    true         switch_user:             role: role_admin             provider: fos_userbundle             parameter: username     dev:         pattern:  ^/(_(profiler|wdt)|css|images|js)/         security: false  providers:     in_memory:         memory:             users:                 user:  { password: userpass, roles: [ 'role_user' ] }                 admin: { password: adminpass, roles: [ 'role_admin' ] }     fos_userbundle:         id: fos_user.user_provider.username  access_control:     - { path: ^/login$, role: is_authenticated_anonymously }     - { path: ^/register, role: is_authenticated_anonymously }     - { path: ^/resetting, role: is_authenticated_anonymously }     - { path: ^/admin/, role: role_admin } 

when remove switch_user part in security.yml, it's working well. have idea why ? need switch_user feature project can't remove it.

switch_user: true 

and

security:     role_hierarchy:         role_admin: [role_user, role_allowed_to_switch] 

try way.


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -