mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Docs: Document the usage of $current_user global in get_user_by().
Follow-up to [50790]. Props paaggeli, mukesh27. Fixes #53088. git-svn-id: https://develop.svn.wordpress.org/trunk@50792 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7e1690bf87
commit
334ef09078
@ -93,6 +93,8 @@ if ( ! function_exists( 'get_user_by' ) ) :
|
||||
* @since 4.4.0 Added 'ID' as an alias of 'id' for the `$field` parameter.
|
||||
* @since 5.8.0 Returns the global `$current_user` if it's the user being fetched.
|
||||
*
|
||||
* @global WP_User $current_user The current user object which holds the user data.
|
||||
*
|
||||
* @param string $field The field to retrieve the user with. id | ID | slug | email | login.
|
||||
* @param int|string $value A value for $field. A user ID, slug, email address, or login name.
|
||||
* @return WP_User|false WP_User object on success, false on failure.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user