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

Retrieves user info by a given field.

Related Functions

get_user, get_term_by, get_users, get_user_by_email, get_user_meta

Top Google Results

User discussions

wpseek mobile