Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when try to get current user #25

Open
turgic opened this issue Jun 5, 2019 · 1 comment
Open

Error when try to get current user #25

turgic opened this issue Jun 5, 2019 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@turgic
Copy link

turgic commented Jun 5, 2019

I created a new api :

/**
     * @Route("/vsbridge/product/get/{product}")
     * @Method("GET")
     *
     * @param Request           $request
     *
     * @return JsonResponse
     */
    public function getProduct(
        Request $request
    ) {
        $user = $this->getUser();

        return $this->json([
            'status' => 200,
            'result' => $user,
        ]);
    }

But I get the error :

Call to a member function isAdmin() on null (500 Internal Server Error)

I confirm that first I called the login method, and with the token from /login I call this new api.
You have an idea @pkarw, @kwreczycki ? thx in advance

@turgic turgic changed the title Error when try to get product repository Error when try to get current user Jun 5, 2019
@dkarlovi dkarlovi added bug Something isn't working question Further information is requested labels Nov 24, 2020
@dkarlovi
Copy link
Contributor

@turgic can you provide a stacktrace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants