tazatek
Member
Posted 3 years ago #
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
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.
tazatek
Member
Posted 3 years ago #