| @@ -56,12 +56,12 @@ | ||
| 56 | 56 | if ( isset( $wp_user->data->user_login ) ) { |
| 57 | 57 | $user_login = $wp_user->data->user_login; |
| 58 | 58 | // Get access to editable roles |
| 59 | 59 | global $wp_roles; |
| 60 | - if ( isset( $_REQUEST['wpda_role'] ) && is_array( $_REQUEST['wpda_role'] ) ) { | |
| 60 | + if ( isset( $_REQUEST['wpda_role'] ) && is_array( $_REQUEST['wpda_role'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- verified on main page | |
| 61 | 61 | // Process roles |
| 62 | 62 | $sanitized_roles = array(); |
| 63 | - foreach ( $_REQUEST['wpda_role'] as $new_user_role ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput | |
| 63 | + foreach ( $_REQUEST['wpda_role'] as $new_user_role ) { // phpcs:ignore -- verified on main page | |
| 64 | 64 | $sanitized_new_user_role = sanitize_text_field( wp_unslash( $new_user_role ) ); // input var okay. |
| 65 | 65 | $wp_user->add_role( $sanitized_new_user_role ); |
| 66 | 66 | $sanitized_roles[ $sanitized_new_user_role ] = true; |
| 67 | 67 | } |