BuddyDev

Search

[Resolved] Force Profile Photo

  • Participant
    Level: Enlightened
    Posts: 38
    Granmeh on #28979

    Hi Brajesh,

    Is there a way to allow the user who has a restriction because he didn’t upload an avatar yet to go on settings page? In order to remove his account if he wants for example.

    Regards,

    Granmeh

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #28985

    Hi Granmeh,
    If you are using BP Force profile photo plugin, you may use the following code

    
    
    /**
     * Skip settings component from force profile.
     */
    add_filter( 'bp_force_profile_photo_skip', function ( $skip ) {
    	if ( bp_is_current_component( 'settings' ) ) {
    		$skip = true;
    	}
    
    	return $skip;
    } );
    
    

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 38
    Granmeh on #29054

    Awesome !!! It’s working great !!!

    Is it the same snippet code for Profile Completion ?

    Regards,

    Granmeh

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #29087

    Hi Granmeh,
    Thank you for confirming that it works.

    No, the above code will not work with BuddyPress profile completion.

    Regards
    Brajesh

The topic ‘ [Resolved] Force Profile Photo’ is closed to new replies.

This topic is: resolved