getGroupRoles() public method

Return all groups, converted it names to role names.
public getGroupRoles ( ) : string[]
return string[]
Example #1
0
 /**
  * @param User $user
  */
 public function manualLogin(User $user)
 {
     $token = new UsernamePasswordToken($user, null, "main", $user->getGroupRoles());
     $this->tokenStorage->setToken($token);
     //now dispatch the login event
     $event = new InteractiveLoginEvent($this->requestStack->getMasterRequest(), $token);
     $this->eventDispatcher->dispatch("security.interactive_login", $event);
 }