BuddyDev

Search

[Resolved] Showing message to user after their profile is complete

  • Participant
    Level: Initiated
    Posts: 18
    Nitin Shah on #38928

    I am using the Buddypress Profile Completion Plugin and would like to show a custom message to only the users whose profile is complete. Is there a code that I can use for the same?

    I tried using the following code:

    // define the xprofile_profile_group_tabs callback

    function action_xprofile_profile_group_tabs( $new ) {
    if ( function_exists( ‘bpprocn_has_incomplete_profile’ ) && ! bpprocn_has_incomplete_profile( $bp_displayed_user_id ) ) {
    echo “Hello”;
    }
    };

    // add the action
    add_action( ‘bp_after_member_header’, ‘action_xprofile_profile_group_tabs’, 10, 1 );

    But it is not showing the message even if the owner has completed all the required fields.

    I tried the same code by removing “!” before bpprocn_has_incomplete_profile( $bp_displayed_user_id ) and the message is shown for all profile owners even whether their profile is complete or not.

    I am testing this with Buddypress 8 RC

    Do let me know as to how I can modify the code to make it work

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #38934

    Hi,
    Please replace $bp_displayed_user_id with bp_displayed_user_id()

    That should show it only for users whose profile have been marked complete.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #39195

    Marking resolved due to lack of reply.

The topic ‘ [Resolved] Showing message to user after their profile is complete’ is closed to new replies.

This topic is: resolved