WordPress at Your Fingertips
filter is not described

user_(field) filter-hook . WP 2.9.0

Filters the value of a user field in a standard context.

The dynamic portion of the hook name, $field, refers to the prefixed user field being filtered, such as 'user_login', 'user_email', 'first_name', etc.


add_filter( 'user_(field)', 'filter_function_name_7984', 10, 3 );
function filter_function_name_7984( $value, $user_id, $context ){
	// filter...

	return $value;
The user object value to sanitize.
User ID.
The context to filter within.


Since 2.9.0 Introduced.

Where the hook is called

wp-includes/user.php 1524
$value = apply_filters( "user_{$field}", $value, $user_id, $context );

Where in WP core the hook is used WordPress

wp-admin/includes/admin-filters.php 94
add_action( 'user_register', array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) );
wp-admin/includes/ms-admin-filters.php 14
add_action( 'user_admin_notices', 'new_user_email_admin_notice' );
wp-includes/default-filters.php 412
add_action( 'user_request_action_confirmed', '_wp_privacy_account_request_confirmed' );
wp-includes/default-filters.php 413
add_action( 'user_request_action_confirmed', '_wp_privacy_send_request_confirmation_notification', 12 ); // After request marked as completed.
wp-includes/default-filters.php 659
add_filter( 'user_has_cap', 'wp_maybe_grant_install_languages_cap', 1 );
wp-includes/default-filters.php 660
add_filter( 'user_has_cap', 'wp_maybe_grant_resume_extensions_caps', 1 );
wp-includes/default-filters.php 661
add_filter( 'user_has_cap', 'wp_maybe_grant_site_health_caps', 1, 4 );