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.


add_filter( 'edit_user_(field)', 'wp_kama_edit_user_field_filter', 10, 2 );

 * Function for `edit_user_(field)` filter-hook.
 * @param mixed $value   Value of the prefixed user field.
 * @param int   $user_id User ID.
 * @return mixed
function wp_kama_edit_user_field_filter( $value, $user_id ){

	// filter...
	return $value;
Value of the prefixed user field.
User ID.


Since 2.9.0 Introduced.

Where the hook is called

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

Where the hook is used in WordPress

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