[symfony-users] Re: Security Component: how to authenticate a user manually?

2010-11-22 Thread gordonslondon
Make a request to the login page (with credientials in POST parameters) works for me. I didn't find any other way. I'm also searching a good way to authenticate a user without any request just a method ( ->authenticate() ); Other things where there's a problem is to authenticate when unit- testin

[symfony-users] Re: Security Component: how to authenticate a user manually?

2010-11-22 Thread pghoratiu
Assuming you use sfGuard it's something like: $this->getUser()->signIn($user); Where $user is an active sf_guard_user entry, so you have to save the entry, signin and then redirect. gabriel On Nov 21, 5:22 pm, noel guilbert wrote: > Hi, > > I have a subscribe form, and I want to log my use

[symfony-users] Re: Security Component: how to authenticate a user manually?

2010-11-22 Thread Johannes
You need to retrieve the security.context service from the DI container, and call ->setToken() with an implementation of TokenInterface. Regards, Johannes On Nov 22, 9:03 am, gordonslondon wrote: > Make a request to the login page (with credientials in POST > parameters) works for me. I didn't f