enable_edit_any_user_configuration
Filter HookDescription
Filters whether to allow administrators on Multisite to edit every user. 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.Hook Information
File Location |
wp-admin/user-edit.php
View on GitHub
|
Hook Type | Filter |
Line Number | 102 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$allow
|
Whether to allow editing of any user. Default true. |
Usage Examples
Basic Usage
<?php
// Hook into enable_edit_any_user_configuration
add_filter('enable_edit_any_user_configuration', 'my_custom_filter', 10, 1);
function my_custom_filter($allow) {
// Your custom filtering logic here
return $allow;
}
Source Code Context
wp-admin/user-edit.php:102
- How this hook is used in WordPress core
<?php
97 * @param bool $allow Whether to allow editing of any user. Default true.
98 */
99 if ( is_multisite()
100 && ! current_user_can( 'manage_network_users' )
101 && $user_id !== $current_user->ID
102 && ! apply_filters( 'enable_edit_any_user_configuration', true )
103 ) {
104 wp_die( __( 'Sorry, you are not allowed to edit this user.' ) );
105 }
106
107 // Execute confirmed email change. See send_confirmation_on_profile_email().
PHP Documentation
<?php
/**
* Filters whether to allow administrators on Multisite to edit every user.
*
* 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.
*
* @since 3.0.0
*
* @param bool $allow Whether to allow editing of any user. Default true.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/user-edit.php
Related Hooks
Related hooks will be displayed here in future updates.