Skip to:
Content
Pages
Categories
Search
Top
Bottom

Problem when i upload avatar in registration page.

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

  • Henry Wright
    Moderator

    @henrywright

    Hi @chavodbharat

    No need to edit the core file. The bp_attachments_current_user_can filter can be used here.

    add_filter( 'bp_attachments_current_user_can', function( $can, $capability ) {
        if ( 'edit_avatar' !== $capability ) {
            return $can;
        }
        // This will let all users upload an avatar (not just logged in members).
        $can = true;
        return $can;
    }, 10, 2 );

    ARCangelGIRL
    Participant

    @arcangelgirl

    Hi @henrywright,

    I’m using “Buddypress Upload Avatar Ajax” (Version 1.0.1) and Buddypress (Version 4.1.0).
    Since upload avatar plugin was not updated I’m experiencing the same problem as @chavodbharat has mentioned – I’m getting “There was a problem cropping your avatar, please try uploading it again” error.

    I tried what he has suggested (edit directly wp-content\plugins\buddypress\bp-core\classes\class-bp-attachment-avatar.php) and I also tried your snippet, but I’m still getting the same problem.

    Does something changed in latests Buddypress versions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar