Getting user id for user-edit.php
-
I’m adding an additional meta data field to user profiles. For the user that’s currently logged in, it’s a simple thing to use
wp_get_current_user()
to get their user id (for associating data within the database). If I’m logged in as an admin, however, and editing another user’s profile, I’m not quite sure how to get that user’s id (in order to pull and save the correct data).Thoughts? One idea is that I could strip it from the URL, but I feel as though it’s a hackish solution and there might be a better one. Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Getting user id for user-edit.php’ is closed to new replies.