protected function getAuthUserId()
    {
        $token = $this->tokenStorage->getToken();
        if (null === $token) {
            return;
        }

        $user = $token->getUser();
        if (!is_object($user)) {
            return;
        }

        return $user->getId();
    }
protected function getAuthUserId()
    {
        $token = $this->tokenStorage->getToken();
        if (null === $token) {
            return;
        }

        $user = $token->getUser();
        if (!is_object($user)) {
            return;
        }

        return $user->getId();
    }
protected function getAuthUserId ( ) { $ token = $ this -> tokenStorage -> getToken ( ) ; if ( null === $ token ) { return ; } $ user = $ token -> getUser ( ) ; if ( ! is_object ( $ user ) ) { return ; } return $ user -> getId ( ) ; }
Get authenticated user id

@return int
Get authenticated user id