WordPress.org

Make WordPress Core

Changeset 33888


Ignore:
Timestamp:
09/03/2015 09:02:13 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/network/site-users.php.

props ericlewis, kraftbj, lukecarbis, mrmist.
fixes #33683. see #14530.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-users.php

    r33641 r33888  
    137137
    138138                    // If the user doesn't already belong to the blog, bail.
    139                     if ( !is_user_member_of_blog( $user_id ) )
    140                         wp_die( __( 'Cheatin’ uh?' ), 403 );
     139                    if ( ! is_user_member_of_blog( $user_id ) ) {
     140                        wp_die(
     141                            '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     142                            '<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>',
     143                            403
     144                        );
     145                    }
    141146
    142147                    $user = get_userdata( $user_id );
  • trunk/src/wp-admin/users.php

    r33885 r33888  
    136136            wp_die(
    137137                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    138                 '<p>' . __( 'One of the selected users in not a member of this site.' ) . '</p>',
     138                '<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>',
    139139                403
    140140            );
Note: See TracChangeset for help on using the changeset viewer.