Le 29/01/2011 21:13, Michael a écrit :
Is there a way to directly use the security feature to login in the
PHP code?
In my project (Latest Symfony2.0), I submit the login/registration
using ajax when processing the data. On failure I return a string with
the error and on success I login the user and return "true" which call
a redirect function (in javascript). In addition to the username/
password I have extra parameters which I need for the process.
Does anyone have an idea how to do something like that?
You can authenticate the user yourself by setting a token in the
security context.
See
https://github.com/FriendsOfSymfony/UserBundle/blob/master/Controller/UserController.php
for an example. In this case, the user is authenticated after he
confirms his email adress.
--
Christophe | Stof
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en