Make WordPress Core


Ignore:
Timestamp:
09/03/2015 09:02:13 AM (9 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.

File:
1 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 );
Note: See TracChangeset for help on using the changeset viewer.