Identity/SecurityIdentityManager.php
protected function addCurrentUser(TokenInterface $token, array $sids)
    {
        if (!$token instanceof AnonymousToken) {
            try {
                $sids[] = UserSecurityIdentity::fromToken($token);
            } catch (\InvalidArgumentException $e) {
                // ignore, user has no user security identity
            }
        }

        return $sids;
    }
protected function addCurrentUser(TokenInterface $token, array $sids)
    {
        if (!$token instanceof AnonymousToken) {
            try {
                $sids[] = UserSecurityIdentity::fromToken($token);
            } catch (\InvalidArgumentException $e) {
                // ignore, user has no user security identity
            }
        }

        return $sids;
    }
protected function addCurrentUser ( TokenInterface $ token , array $ sids ) { if ( ! $ token instanceof AnonymousToken ) { try { $ sids [ ] = UserSecurityIdentity :: fromToken ( $ token ) ; } catch ( \ InvalidArgumentException $ e ) { // ignore, user has no user security identity } } return $ sids ; }
Add the security identity of current user.

@param TokenInterface              $token The token
@param SecurityIdentityInterface[] $sids  The security identities

@return SecurityIdentityInterface[]
Add the security identity of current user .