romankac
Forum Replies Created
-
@niko87 Or maybe try profile_cover instead um-cover
I’m not sure but you can try to change “profile_photo” to “um-cover” key in: /wp-content/themes/your-theme-name/function.php
add_filter('um_user_pre_updating_files_array','um_custom_user_pre_updating_files_array', 10, 1); function um_custom_user_pre_updating_files_array( $arr_files ){ if( is_array( $arr_files ) ){ foreach( $arr_files as $key => $details ){ if( $key == 'usercover' ){ unset( $arr_files[ $key ] ); $arr_files[ 'um-cover' ] = $details; } } } return $arr_files; } add_filter('um_allow_frontend_image_uploads','um_custom_allow_frontend_image_uploads',10, 3); function um_custom_allow_frontend_image_uploads( $allowed, $user_id, $key ){ if( $key == 'um-cover' ){ return true; } return $allowed; // false }
Also you must set up Meta Key in registration form to “usercover” (without quotes).
1) Are you using any plugins, such as the Admin Menu Editor or something that could affect the permissions?
2) Try disable all plugins that might conflict with the Ultimate member and affect the permissions settings.
3) Is really not the user already registered? Have you tried another registration e-mail or have a look at the users?
4) What about UM > Settings > Uploads? I have a set limit, but it probably will not affect – https://imgur.com/a/41zPU9E
5) If nothing helps, I can look myself. In this case, please send me the login information with the administrator rights to the e-mail [email protected]
@pfsoto Try modifying folder and subfolder permissions to chmod 777 please. Clear the browser cache and try registration on a new anonymous window (CTRL+SHIFT+n for Chrome).
@httpscard add the code to wp-content/themes/your-theme-name/function.php
And set the meta key name of upload input to: “userphoto” (without quotes)
@httpscard are you added the code to function.php in THEME folder? wp-content/themes/your-theme-name/function.php
It’s working for me on https://www.darujkouseksebe.cz
[SOLVED]
Add this code to public_html/wp-content/themes/your-theme-name/function.php
/** * Ultimate Member – Customization * Description: Allow everyone to upload profile and cover photos on front-end pages. */ add_filter('um_user_pre_updating_files_array','um_custom_user_pre_updating_files_array', 10, 1); function um_custom_user_pre_updating_files_array( $arr_files ){ if( is_array( $arr_files ) ){ foreach( $arr_files as $key => $details ){ if( $key == 'userphoto' ){ unset( $arr_files[ $key ] ); $arr_files[ 'profile_photo' ] = $details; } } } return $arr_files; } add_filter('um_allow_frontend_image_uploads','um_custom_allow_frontend_image_uploads',10, 3); function um_custom_allow_frontend_image_uploads( $allowed, $user_id, $key ){ if( $key == 'profile_photo' ){ return true; } return $allowed; // false }
- This reply was modified 7 years ago by romankac.
UPDATED PHP CODE: corrected quotes from “” to ”
- This reply was modified 7 years ago by romankac.