Support » Fixing WordPress » Get User ID from user admin page

  • Is there a way I can get another user ID or user name from their user profile page, when I am logged in as the admin?

    For instance, I am logged in as the admin, I am looking at a different user’s profile. I want to get the id of the user’s profile I am looking at, not my own.

    I’ve tried,

    $screen = get_current_screen();
    echo ($screen->ID);

    and a few variations of that, but that didn’t work. Any ideas?

Viewing 1 replies (of 1 total)
  • Actually, I should probably add that I used the Modify_contact_methods() filter:

    function modify_contact_methods($profile_fields) {
    $screen = get_current_screen();
    echo ($screen->ID);
    }
    add_filter('user_contactmethods', 'modify_contact_methods');
Viewing 1 replies (of 1 total)
  • The topic ‘Get User ID from user admin page’ is closed to new replies.