sanitize_user_object


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

Parameters:
  • (object|array) $user The User Object or Array
  • (string) $context Optional, default is 'display'. How to sanitize user fields.
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 santization of the int fields.

Related Functions

sanitize_user, sanitize_user_field, sanitize_url, sanitize_post, sanitize_meta

Top Google Results

User discussions

wpseek mobile