Support » Plugin: API Bearer Auth » How to get current user?

  • Resolved serdarde

    (@serdarde)


    I have installed the plugin and made a successful request to get access token. Now I make my request with the token but I don’t know which user sends the request.

    Where do you put the user’s information? I didn’t see any information about this on docu.

    thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter serdarde

    (@serdarde)

    I had to remember that I am using the WordPress; if someone else needs:

    $user = wp_get_current_user();

    Plugin Author michielve

    (@michielve)

    Hey,
    Yes that’s the correct way to get the user. After you send a request with the access token, WordPress logs you in, so everything works as usual!
    Michiel

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get current user?’ is closed to new replies.