Title: Get current user
Last modified: October 15, 2018

---

# Get current user

 *  Resolved [adamjgriffith](https://wordpress.org/support/users/adamjgriffith/)
 * (@adamjgriffith)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/get-current-user/)
 * Hi,
 * I am trying to figure out how to access the current authenticated user in a register_rest_route
   callback function.
 * I’m sure I’m just missing something as this should be regularly used functionality.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fget-current-user%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Alex Kozack](https://wordpress.org/support/users/cawa-93/)
 * (@cawa-93)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/get-current-user/#post-10894431)
 * /wp-json/wp/v2/users/me
 *  Thread Starter [adamjgriffith](https://wordpress.org/support/users/adamjgriffith/)
 * (@adamjgriffith)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/get-current-user/#post-10899466)
 * Hi Alex,
 * Thanks for the reply but this is unfortunately not what I am looking for.
 * I need to be able to determine the current user on an api endpoint without sending
   the user id with the request as this would be insecure.
 * It turns out I answered my own question but forgot to report back here.
 * `$user = apply_filters('determine_current_user', false);`
 * Hope this helps someone in the future.
 * Adam

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Get current user’ is closed to new replies.

 * ![](https://ps.w.org/jwt-authentication-for-wp-rest-api/assets/icon-256x256.jpg?
   rev=3372068)
 * [JWT Authentication for WP REST API](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/)
 * [Active Topics](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [adamjgriffith](https://wordpress.org/support/users/adamjgriffith/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/get-current-user/#post-10899466)
 * Status: resolved