edit_user_(field) filter-hookWP 2.9.0

Filters a user field value in the 'edit' 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.

Usage

add_filter( 'edit_user_(field)', 'wp_kama_edit_user_field_filter', 10, 2 );
function wp_kama_edit_user_field_filter( $value, $user_id ){
	// filter...

	return $value;
}
$value(mixed)
Value of the prefixed user field.
$user_id(int)
User ID.

Changelog

Since 2.9.0 Introduced.

Where the hook is called

sanitize_user_field()
edit_user_(field)
wp-includes/user.php 1617
$value = apply_filters( "edit_user_{$field}", $value, $user_id );

Where the hook is used in WordPress

wp-includes/default-filters.php 499
add_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );