BuddyDev

Search

Buddypress Member types pro photo issue with buddypress profile completion

  • Participant
    Level: Guru
    Posts: 885
    Tosin on #51298

    Hello,

    I have the feature to associate custom avatar enabled in the (member types pro) plugin while the (buddypress profile completion) is enabled (user must have profile photo). The issue now is users aren’t being restricted to upload their profile photo/ complete profile since custom avatar has already been uploaded for member types.

    buddypress profile completion is already detecting the custom avatar set in member types pro so its not forcing new profile photo upload for new users.

    An update to buddypress profile completion might be helpful

    I also have the code below in my custom.php file

    // Do not redirect users on non bp pages.
    function buddydev_skip_redirect_on_non_bp_pages( $skip ) {
        if ( ! is_buddypress() ) {
            $skip = true;
        }
        return $skip;
    }
    add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_skip_redirect_on_non_bp_pages' );
    
    // Do not skip redirect on new post.
    function buddydev_dont_skip_redirect_on_cta_pages( $skip ) {
    	if( is_page( array( 'create-content', 'publish', 'wallet', 'affiliate-area','create-new-post', 'advertise', 'create-new-advert', 'manage-listings' ) ) ) {
    		if( is_user_logged_in() ){
    		$skip = false;
    	}
      }
    	return $skip;
    }
    add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_dont_skip_redirect_on_cta_pages', 20 );  
  • Participant
    Level: Guru
    Posts: 885
    Tosin on #51335

    Gentle reminder sir thanks

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2933
    Ravi on #51345

    Hello Tosin,

    Please try the following code:

    
    add_filter( 'bp_core_default_avatar_user', function ( $avatar_url, $params ) {
    
    	if ( function_exists( 'bpmtp_get_option' ) && bpmtp_get_option( 'override_member_avatar', 0 ) ) {
    		$avatar_url = bp_core_avatar_default( 'local', $params );
    	}
    
    	return $avatar_url;
    }, 105, 2 );
    
    

    Regards
    Ravi

  • Participant
    Level: Guru
    Posts: 885
    Tosin on #51356

    Hello Ravi

    The code did not work, the code you provided removed the profile photos I set for the member types. I dont want the custom profile photos to be removed but I want the saved membertype profile photo to be compatible and work along side the buddypress profile completion plugin.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2933
    Ravi on #51367

    Hello Tosin,

    Thank you for the acknowledgement. I will check with member types pro and will let you know.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2933
    Ravi on #51378

    Hello Tosin,

    I have checked the code and it is working except in admin it does not show the default member type photo on the user list table screen. To fix this you can use the following code:

    
    add_filter( 'bp_core_default_avatar_user', function ( $avatar_url, $params ) {
    
    	if ( ! is_admin() && function_exists( 'bpmtp_get_option' ) && bpmtp_get_option( 'override_member_avatar', 0 ) ) {
    		$avatar_url = bp_core_avatar_default( 'local', $params );
    	}
    
    	return $avatar_url;
    }, 105, 2 );
    
    

    Please give it a try with this. If it still does not work please disable other custom code and then try.

    Regards
    Ravi

  • Participant
    Level: Guru
    Posts: 885
    Tosin on #51379

    Thanks Ravi

    I hope this can be resolved soonest as new members on my site arent uploading new profile photos

    Regards

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2933
    Ravi on #51381

    Hello Tosin,

    Thank you for the acknowledgement. Please let me know if there is any issue.

    Regards
    Ravi

  • Participant
    Level: Guru
    Posts: 885
    Tosin on #51398

    Hello Ravi,

    Please note that this issue is not yet resolved, The custom member type photo is not displaying everywhere, it is only showing in the members directory its is not showing in activity and profile pages

    Thanks

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2933
    Ravi on #51533

    Hello Tosin,

    Sorry for the delayed reply. Please tell me more about your issue. I am not getting it properly.

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: not resolved