get_user_by


get_user_by ( $field, $value )

Parameters:
  • (string) $field The field to retrieve the user with. id | ID | slug | email | login.
  • (int|string) $value A value for $field. A user ID, slug, email address, or login name.
Returns:
  • (WP_User|false) WP_User object on success, false on failure.
Defined at:
Change Log:
  • 4: .

Description

Retrieve user info by a given field

Related Functions

get_term_by, get_users, get_user_by_email, get_user_meta, get_user_count

Top Google Results

User discussions

wpseek mobile