Listener/OrganizationSecurityIdentitySubscriber.php
public function addOrganizationSecurityIdentities(AddSecurityIdentityEvent $event): void
    {
        try {
            $sids = $event->getSecurityIdentities();
            $sids = IdentityUtils::merge(
                $sids,
                OrganizationSecurityIdentity::fromToken(
                    $event->getToken(),
                    $this->context,
                    $this->roleHierarchy
                )
            );
            $event->setSecurityIdentities($sids);
        } catch (\InvalidArgumentException $e) {
            // ignore
        }
    }
public function addOrganizationSecurityIdentities(AddSecurityIdentityEvent $event): void
    {
        try {
            $sids = $event->getSecurityIdentities();
            $sids = IdentityUtils::merge(
                $sids,
                OrganizationSecurityIdentity::fromToken(
                    $event->getToken(),
                    $this->context,
                    $this->roleHierarchy
                )
            );
            $event->setSecurityIdentities($sids);
        } catch (\InvalidArgumentException $e) {
            // ignore
        }
    }
public function addOrganizationSecurityIdentities ( AddSecurityIdentityEvent $ event ) : void { try { $ sids = $ event -> getSecurityIdentities ( ) ; $ sids = IdentityUtils :: merge ( $ sids , OrganizationSecurityIdentity :: fromToken ( $ event -> getToken ( ) , $ this -> context , $ this -> roleHierarchy ) ) ; $ event -> setSecurityIdentities ( $ sids ) ; } catch ( \ InvalidArgumentException $ e ) { // ignore } }
Add organization security identities.

@param AddSecurityIdentityEvent $event The event
Add organization security identities .