I am using Symfony 2.4. After a user registers I need to log him in and automatically and also have the remember me functionality enabled as well along with it.
at the moment to login I use the following code
$token = new UsernamePasswordToken($fb_userByEmail, $fb_userByEmail->getPassword(), 'member_area', $fb_userByEmail->getRoles()); $this->get('security.context')->setToken($token); $this->get('session')->set('_security_member_area', serialize($token));
but I need the remember me functionality as well.
the RememberMeToken doesn't seem to help in this case as well.