• Resolved tazatek

    (@tazatek)


    I’ve been reviewing a lot of plugins that use the WP_users() method, but I can’t seem to find the docs to describe what it’s true purpose….

    I could guess, but I kinda like my feet ??

    Any tips on what it does, or a link to its ref page would be fantastic!

    Matt

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Do you mean WP_User? That’s a class in WordPress. It defines a single user.

    You can pull all the info about a WordPress user like so:
    $user = new WP_User($id); // or $name, if you know that instead

    Then you can modify that user’s roles and capabilities, as well as access their information.

    Look in wp-includes/capabilities.php.

    Thread Starter tazatek

    (@tazatek)

    Excellent… thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP_Users docs or purpose?’ is closed to new replies.