sanitize_user_field
sanitize_user_field ( $field, $value, $user_id, $context )
Parameters:- (string) field The user Object field name.
- (mixed) value The user Object value.
- (int) user_id User ID.
- (string) context How to sanitize user fields. Looks for 'raw', 'edit', 'db', 'display', 'attribute' and 'js'.
Returns:Defined at: - Introduced in WordPress: 2.3.0
- Deprecated in WordPress: —
Description
Sanitizes user field based on context.Possible context values are: 'raw', 'edit', 'db', 'display', 'attribute' and 'js'. The
'display' context is used by default. 'attribute' and 'js' contexts are treated like 'display'
when calling filters.