WPDev.one
Core Function
View Source on Trac ↗

sanitize_user_object()

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

Sanitize every user field.

Parameters 1 required

Name / Type Description
(object

| array) $user The user object or array.

Required
$context
string

Optional. How to sanitize user fields. Default 'display'.

Return Value

((object)
| array) The now sanitized user object or array (will be the same type as $user).

Function Information

Since Version
2.3.0
Source File
wp-includes/deprecated.php
Advertisement