Changeset 40780 for trunk/src/wp-admin/network/site-users.php
- Timestamp:
- 05/18/2017 05:07:23 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/network/site-users.php
r38957 r40780 139 139 check_admin_referer( 'bulk-users' ); 140 140 $editable_roles = get_editable_roles(); 141 if ( empty( $editable_roles[ $_REQUEST['new_role'] ] ) ) { 141 $role = false; 142 if ( ! empty( $_REQUEST['new_role2'] ) ) { 143 $role = $_REQUEST['new_role2']; 144 } elseif ( ! empty( $_REQUEST['new_role'] ) ) { 145 $role = $_REQUEST['new_role']; 146 } 147 148 if ( empty( $editable_roles[ $role ] ) ) { 142 149 wp_die( __( 'Sorry, you are not allowed to give users that role.' ) ); 143 150 } … … 159 166 160 167 $user = get_userdata( $user_id ); 161 $user->set_role( $ _REQUEST['new_role']);168 $user->set_role( $role ); 162 169 } 163 170 } else {
Note: See TracChangeset
for help on using the changeset viewer.