Skip to:
Content
Pages
Categories
Search
Top
Bottom

Only administrator can change avatar…


  • joshanderton
    Participant

    @joshanderton

    Hello,

    My website that is using BuddyPress (not using BBPress) is not allowing subscribers to change their avatars in their BuddyPress extended profile (getting the error message: “An error occurred. Please try again later.”). Only users with the Administrator user role are able to change their avatars.

    I have tried deactivating all plugins and this did not fix the issue. I have even installed a user role editor plugin and matched the subscriber role with all of the capabilities of the admin role (only for testing).

    What makes it even more strange is that I have aa “preview” site running in a subdirectory of the main site where only subscribers are unable to upload an avatar (Contributors, Authors, Editors, etc. are all able to upload avatars).

    The only other possible cause that I can think of is a file permissions issue (anybody know which file(s) would be the problem in this case).

    Any help would be so appreciated!

    Thanks,
    Joshua

Viewing 3 replies - 1 through 3 (of 3 total)

  • danbp
    Moderator

    @danbp

    Hi,

    review BuddyPress settings page for:
    Profile Settings
    Profile Photo Uploads [x] Allow registered members to upload avatars


    joshanderton
    Participant

    @joshanderton

    Thanks so much for your response.

    I spoke too soon though, the problem was due to a redirect I had created so that non-admins could not view the admin panel.

    Thanks again!


    Andrew Tibbetts
    Participant

    @andrewgtibbetts

    Oooooh, this must be my issue.
    Here is my current redirect:

    // keep the 'normies' out of the admin
    add_action( 'admin_init', 'custom_admin_init', 1 );
    function custom_admin_init() {
    
    	if ( is_user_logged_in() && ! current_user_can( 'administrator' ) ) {
    
    		wp_redirect( home_url() ); die();
    	}
    }
    

    Were you able to figure out how to keep the redirect but allow the uploads?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Only administrator can change avatar…’ is closed to new replies.
Skip to toolbar