I have implemented a login function programmatically.
This code is following:
$token = new UsernamePasswordToken($user, $user->getPassword(), 'main', $user->getRoles());
$this->get('security.context')->setToken($token);
$event = new InteractiveLoginEvent($this->getRequest(),$token);
$this->get('event_dispatcher')->dispatch('security.interactive_login', $event);
After this, how do I implement remember me ?
(I know how to use form, but I want to implement remember me programmatically. )
please help...