src/Sulu/Component/Media/SystemCollections/SystemCollectionManager.php
private function getUserId()
    {
        if (!$this->tokenProvider || null === ($token = $this->tokenProvider->getToken())) {
            return;
        }

        if (!$token->getUser() instanceof UserInterface) {
            return;
        }

        return $token->getUser()->getId();
    }
private function getUserId()
    {
        if (!$this->tokenProvider || null === ($token = $this->tokenProvider->getToken())) {
            return;
        }

        if (!$token->getUser() instanceof UserInterface) {
            return;
        }

        return $token->getUser()->getId();
    }
private function getUserId ( ) { if ( ! $ this -> tokenProvider || null === ( $ token = $ this -> tokenProvider -> getToken ( ) ) ) { return ; } if ( ! $ token -> getUser ( ) instanceof UserInterface ) { return ; } return $ token -> getUser ( ) -> getId ( ) ; }
Returns current user.

@return int
Returns current user .