sanitize_user_object


sanitize_user_object ( $user, $context = 'display' )

Parameters:
  • (object|array) user The user object or array.
  • (string) context Optional. How to sanitize user fields. Default 'display'.
Returns:
  • (object|array) The now sanitized user object or array (will be the same type as $user).
Defined at:

Description

Sanitize every user field.If the context is 'raw', then the user object or array will get minimal sanitization of the int fields.

Related Functions

sanitize_user, sanitize_user_field, rest_sanitize_object, sanitize_url, sanitize_meta

Top Google Results

User discussions

wpseek mobile