wppaste
WordPress

apply_filters( 'enable_edit_any_user_configuration', bool $allow )

Since
3.0.0
Filters whether to allow administrators on Multisite to edit every user.

Description

Enabling the user editing form via this filter also hinges on the user holding the 'manage_network_users' cap, and the logged-in user not matching the user profile open for editing.

The filter was introduced to replace the EDIT_ANY_USER constant.

Compatibility

WordPress
since 3.0.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$allowbool
Whether to allow editing of any user. Default true.

Where this hook fires · 1

  • wp-admin/user-edit.php:102file scope

Source code

 * * @param bool $allow Whether to allow editing of any user. Default true. */if ( is_multisite()	&& ! current_user_can( 'manage_network_users' )	&& $user_id !== $current_user->ID	&& ! apply_filters( 'enable_edit_any_user_configuration', true )) {	wp_die( __( 'Sorry, you are not allowed to edit this user.' ) );} // Execute confirmed email change. See send_confirmation_on_profile_email().if ( IS_PROFILE_PAGE && isset( $_GET['newuseremail'] ) && $current_user->ID ) {

Changelog

Introduced in 3.0.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.