For a project, we need to give access to a user with 2 password. One is the user’s password, the second will be a temporary password to give access to the account by an administrator.
After many researches, we didn’t find how to do that. The auth process is handled by the core of Symfony2, in this file : DaoAuthenticationProvider.php
Does someone have an idea to help us ? We try looking in the FOSUserBundle but it’s using Symfony2 to auth an user too …
Thanks !
Ok, finally we found an other way to solve our issue. We wanted to be able to get access to an user without having his password.
And we found in the Symfony 2 documentation the impersonating function which can give access to an user only by passing the username in the URL with the parameter _switch_user
For more information take a look here :
http://symfony.com/doc/current/book/security.html#impersonating-a-user