php - FOS UserBundle User Manager - login after updateUser -
i ask whether package fos userbundle when add user, can log user manager? if so, in way?
$usermanager = $this->container->get('fos_user.user_manager'); $user = $usermanager->createuser(); $user -> setusername('test'); $user -> setemail('test'); $user -> setplainpassword('test'); $user ->setenabled(true); $usermanager->updateuser($user, true);`
`
problem solved.
$loginmanager = $this->container->get('fos_user.security.login_manager'); $firewallname = $this->container->getparameter('fos_user.firewall_name'); $loginmanager->loginuser($firewallname, $user);
thanks help