mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-12 11:16:35 +09:00
- 2.0.46 pre-release;
This commit is contained in:
@@ -171,6 +171,10 @@ if ( ! class_exists( 'um\core\Files' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( validate_file( $file_path ) !== 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$file_info = get_user_meta( $user_id, $field_key . "_metadata", true );
|
||||
|
||||
$pathinfo = pathinfo( $file_path );
|
||||
@@ -211,6 +215,10 @@ if ( ! class_exists( 'um\core\Files' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( validate_file( $file_path ) !== 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$file_info = get_user_meta( $user_id, $field_key . "_metadata", true );
|
||||
|
||||
$pathinfo = pathinfo( $file_path );
|
||||
|
||||
@@ -267,11 +267,13 @@ function um_user_edit_profile( $args ) {
|
||||
|
||||
if ( isset( $args['submitted'][ $key ] ) ) {
|
||||
|
||||
if ( isset( $array['type'] ) && in_array( $array['type'], array( 'image', 'file' ) ) &&
|
||||
( /*um_is_file_owner( UM()->uploader()->get_upload_base_url() . um_user( 'ID' ) . '/' . $args['submitted'][ $key ], um_user( 'ID' ) ) ||*/
|
||||
um_is_temp_file( $args['submitted'][ $key ] ) || $args['submitted'][ $key ] == 'empty_file' ) ) {
|
||||
if ( isset( $array['type'] ) && in_array( $array['type'], array( 'image', 'file' ) ) ) {
|
||||
|
||||
$files[ $key ] = $args['submitted'][ $key ];
|
||||
if ( /*um_is_file_owner( UM()->uploader()->get_upload_base_url() . um_user( 'ID' ) . '/' . $args['submitted'][ $key ], um_user( 'ID' ) ) ||*/ um_is_temp_file( $args['submitted'][ $key ] ) || $args['submitted'][ $key ] == 'empty_file' ) {
|
||||
$files[ $key ] = $args['submitted'][ $key ];
|
||||
} else {
|
||||
$files[ $key ] = 'empty_file';
|
||||
}
|
||||
|
||||
} else {
|
||||
if ( $array['type'] == 'password' ) {
|
||||
|
||||
@@ -602,7 +602,7 @@ function um_registration_save_files( $user_id, $args ) {
|
||||
|
||||
foreach ( $fields as $key => $array ) {
|
||||
|
||||
if ( isset( $args['submitted'][$key] ) ) {
|
||||
if ( isset( $args['submitted'][ $key ] ) ) {
|
||||
|
||||
if ( isset( $fields[ $key ]['type'] ) && in_array( $fields[ $key ]['type'], array( 'image', 'file' ) ) &&
|
||||
( um_is_temp_file( $args['submitted'][ $key ] ) || $args['submitted'][ $key ] == 'empty_file' )
|
||||
|
||||
Reference in New Issue
Block a user