I think there is misunderstanding from start.
My intention is to change the default mystery man avatar based on member type
I enabled 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 PROBLEM
Since the default mystery man avatar has been changed buddypress profile completion plugin is no longer forcing members to change their avatarI using this filter to redirect users to force profile completion
// filter buddypress profile completion redirect url to the (complete-profile) page. add_filter( 'buddypress_profile_completion_redirect', function ( $redirect_url ) { return home_url( '/complete-profile/' ); } );
other codes im using are
// Do not redirect users on user profile and activity directory pages. function buddydev_skip_urls_on_loggedin_user_profile_and_activity_directory_page( $skip ) { if ( bp_is_my_profile() || bp_is_activity_directory() ) { $skip = true; } return $skip; } add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_skip_urls_on_loggedin_user_profile_and_activity_directory_page' ); // Redirect users on members directory pages. function buddydev_skip_urls_on_members_directory( $skip ) { if ( bp_is_members_directory() ) { $skip = false; } return $skip; } add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_skip_urls_on_members_directory' ); // 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' );
Hello Tosin,
Disable the following code and then try:
// Do not redirect users on user profile and activity directory pages. function buddydev_skip_urls_on_loggedin_user_profile_and_activity_directory_page( $skip ) { if ( bp_is_my_profile() || bp_is_activity_directory() ) { $skip = true; } return $skip; } add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_skip_urls_on_loggedin_user_profile_and_activity_directory_page' );
Make sure to try with a new account.
Regards
RaviThis did not work.
I want all those codes enabled, they all work seamlessly when the feature (Override member avatar) is disabled in the member types pro plugin.
But when the (Override member avatar) feature is enabled new users are no longer forced to upload their profile picture
The Override is acting as if new users have already uploaded their profile photo mean while its meant to behave as if users have not uploaded their first pictures since they newly registered.
You must be logged in to reply to this topic.