• Resolved meowmeowtat

    (@meowmeowtat)


    Hello! I have the “Allow Contributors & Subscribers to upload avatars” option selected, but subscribers cannot upload. It allows them to select an image, but clicking “upload” simply refreshes the page. There is no error.

    I also granted the subscriber role the ability to upload images, but it did not help.

    Please advise! Thank you!

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • I am running a test site on locally and experiencing the exact same problem. I have a custom profile page where subscribers should be able to upload an avatar. When I log into the site as admin, I have no problem. When I log in as a subscriber, I can upload a file but the avatar does not update, neither do the preview/thumbnail images.

    I am having the same problem. Works for admin but not subscribers. Any word on this?

    Some additional information on this. I can upload an image as a subscriber from the backend, that is in the user profile, but it doesn’t work from the avatar_upload shortcode used on the frontend.

    I have tha same problem. Did anyone find a solution?

    I never did figure out how to allow subscribers to upload an image from the frontend, so I ended up giving them access their profile on the backend, and they can upload from there.

    I’ve same problem, Please fix it.

    kohai

    (@kohai)

    Hello all !

    Got the problem here, front-end submit works, no error message but still the avatar is not showing.

    Anybody got it sorted out ?

    Same exact problem, woul appreciate the help!

    Same here …

    Well, seems the problem lies in the admin rights … Even when you authorize the user to upload a pic, users are still not granted access to the media viewer. ??

    So it’s a no-go, i suspect !

    the same issue with me.
    it works perfectly for admin , but it does not work for any other user roles

    PS:i found this link , is this helpful?
    not sure let me check first
    https://www.ads-software.com/support/topic/end-user-front-end-avatar-change/

    • This reply was modified 4 years, 7 months ago by highfly.

    It works for me doing the following:

    1. Enable “Allow Contributors & Subscribers to upload avatars” in the WP User Avatar settings
    2. Put shortcode in your template: <?php echo do_shortcode("[avatar_upload]"); ?> Note: I first tried without success to add the user name as second parameter but finally saw in the source code that user defaults to current user (so it should work using ID, login, slug, or e-mail address)
    3. Add capabilites upload_files and edit_user to subscriber (or other roles):
    function add_cap_upload() {
    	$role = get_role( 'subscriber' );
    	$role->add_cap( 'upload_files' ); 
    	$role->add_cap( 'edit_user' ); 
    }
    add_action( 'init', 'add_cap_upload' );
Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Front end avatar upload not working for subscribers’ is closed to new replies.