mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Merge remote-tracking branch 'remotes/origin/fix/helpscout#33012_ajax_image_upload'
This commit is contained in:
@@ -286,6 +286,7 @@ if ( ! class_exists( 'um\core\Files' ) ) {
|
||||
wp_send_json_error( esc_js( __( 'Invalid coordinates', 'ultimate-member' ) ) );
|
||||
}
|
||||
|
||||
$user_id = empty( $_REQUEST['user_id'] ) ? get_current_user_id() : $_REQUEST['user_id'];
|
||||
$image_path = um_is_file_owner( $src, $user_id, true );
|
||||
if ( ! $image_path ) {
|
||||
wp_send_json_error( esc_js( __( 'Invalid file ownership', 'ultimate-member' ) ) );
|
||||
@@ -312,7 +313,7 @@ if ( ! class_exists( 'um\core\Files' ) ) {
|
||||
$id = $_POST['key'];
|
||||
$timestamp = $_POST['timestamp'];
|
||||
$nonce = $_POST['_wpnonce'];
|
||||
$user_id = $_POST['user_id'];
|
||||
$user_id = empty( $_POST['user_id'] ) ? get_current_user_id() : $_POST['user_id'];
|
||||
|
||||
UM()->fields()->set_id = $_POST['set_id'];
|
||||
UM()->fields()->set_mode = $_POST['set_mode'];
|
||||
|
||||
Reference in New Issue
Block a user