WP_User::get() WordPress Method
The WP_User::get() method is used to retrieve a user object by a given field and value. The fields that can be used to search for a user include 'ID', 'user_login', 'user_email', and 'user_nicename'.
WP_User::get( string $key ) #
Retrieves the value of a property or meta key.
Description
Retrieves from the users and usermeta table.
Parameters
- $key
(string)(Required)Property
Return
(mixed)
Source
File: wp-includes/class-wp-user.php
public function get( $key ) { return $this->__get( $key ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |