public function getSecurityIdentities(TokenInterface $token)
    {
        $sids = parent::getSecurityIdentities($token);

        if ($token->getUser() instanceof \BackBee\Security\User) {
            foreach ($token->getUser()->getGroups() as $group) {
                $securityIdentity = new UserSecurityIdentity($group->getObjectIdentifier(), ClassUtils::getRealClass($group));
                array_unshift($sids, $securityIdentity);
            }
        }

        return $sids;
    }
public function getSecurityIdentities(TokenInterface $token)
    {
        $sids = parent::getSecurityIdentities($token);

        if ($token->getUser() instanceof \BackBee\Security\User) {
            foreach ($token->getUser()->getGroups() as $group) {
                $securityIdentity = new UserSecurityIdentity($group->getObjectIdentifier(), ClassUtils::getRealClass($group));
                array_unshift($sids, $securityIdentity);
            }
        }

        return $sids;
    }
public function getSecurityIdentities ( TokenInterface $ token ) { $ sids = parent :: getSecurityIdentities ( $ token ) ; if ( $ token -> getUser ( ) instanceof \ BackBee \ Security \ User ) { foreach ( $ token -> getUser ( ) -> getGroups ( ) as $ group ) { $ securityIdentity = new UserSecurityIdentity ( $ group -> getObjectIdentifier ( ) , ClassUtils :: getRealClass ( $ group ) ) ; array_unshift ( $ sids , $ securityIdentity ) ; } } return $ sids ; }
Retrieves the available security identities for the given token.

@param \Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token

@return array An array of SecurityIdentityInterface implementations
Retrieves the available security identities for the given token .