mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Merge pull request #1585 from ultimatemember/fix/profile_upload_role_specific
Fixes the role specific profile file/image upload
This commit is contained in:
@@ -376,6 +376,8 @@ if ( ! class_exists( 'um\core\Files' ) ) {
|
||||
wp_send_json_error( esc_js( __( 'You have no permission to edit this user through this form', 'ultimate-member' ) ) );
|
||||
}
|
||||
|
||||
$post_data['role'] = maybe_unserialize( $post_data['role'] );
|
||||
|
||||
if ( is_array( $post_data['role'] ) ) {
|
||||
if ( ! count( array_intersect( $post_data['role'], $current_user_roles ) ) ) {
|
||||
wp_send_json_error( esc_js( __( 'You have no permission to edit this user through this form', 'ultimate-member' ) ) );
|
||||
@@ -538,6 +540,8 @@ if ( ! class_exists( 'um\core\Files' ) ) {
|
||||
wp_send_json_error( $ret );
|
||||
}
|
||||
|
||||
$post_data['role'] = maybe_unserialize( $post_data['role'] );
|
||||
|
||||
if ( is_array( $post_data['role'] ) ) {
|
||||
if ( ! count( array_intersect( $post_data['role'], $current_user_roles ) ) ) {
|
||||
$ret['error'] = esc_html__( 'You have no permission to edit this user through this form', 'ultimate-member' );
|
||||
@@ -706,6 +710,8 @@ if ( ! class_exists( 'um\core\Files' ) ) {
|
||||
wp_send_json_error( $ret );
|
||||
}
|
||||
|
||||
$post_data['role'] = maybe_unserialize( $post_data['role'] );
|
||||
|
||||
if ( is_array( $post_data['role'] ) ) {
|
||||
if ( ! count( array_intersect( $post_data['role'], $current_user_roles ) ) ) {
|
||||
$ret['error'] = esc_html__( 'You have no permission to edit this user through this form', 'ultimate-member' );
|
||||
|
||||
@@ -172,6 +172,7 @@ IMPORTANT: PLEASE UPDATE THE PLUGIN TO AT LEAST VERSION 2.6.7 IMMEDIATELY. VERSI
|
||||
|
||||
* Fixed: "Load textdomain just in time" issue
|
||||
* Fixed: Capabilities checking in the wp-admin > Users list table
|
||||
* Fixed: File/image upload on the role specific profile form
|
||||
* Fixed: Issues when the form's custom fields meta has a wrong format
|
||||
* Fixed: Validation of the "Registration Default Role" slug
|
||||
* Fixed: Allowed query variables via registered REST API class only when REST_REQUEST is defined
|
||||
|
||||
Reference in New Issue
Block a user