Switch the multisite constant EDIT_ANY_USER to a filter. Also ensure we're back compat with POST_BY_EMAIL. see #12381

git-svn-id: https://develop.svn.wordpress.org/trunk@13568 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-03-03 07:04:25 +00:00
parent f9e7db18bf
commit 4ee4545c85
3 changed files with 41 additions and 31 deletions
+2 -2
View File
@@ -61,8 +61,8 @@ function use_ssl_preference($user) {
}
// Only allow site admins to edit every user.
if ( is_multisite() && !defined( "EDIT_ANY_USER" ) && !is_super_admin() && $user_id != $current_user->ID )
// Only allow super admins on multisite to edit every user.
if ( is_multisite() && ! is_super_admin() && $user_id != $current_user->ID && apply_filters( 'enable_edit_any_user_configuration', true ) )
wp_die( __( 'You do not have permission to edit this user.' ) );
// Execute confirmed email change. See send_confirmation_on_profile_email().