# BuddyPress: Remind Members to Complete Their Profile

> Shows a friendly notice on BuddyPress pages to members who have not filled in important profile fields or uploaded a profile photo, with a link to edit their profile.

- Type: PHP
- Runs: Run everywhere
- Category: [Users](https://wpide.com/library/category/users/)
- Tags: buddypress, profile, onboarding
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/buddypress-profile-completion-reminder/

## Code

```php
if ( ! function_exists( 'buddypress' ) ) {
    return;
}

// Profile field names that should be filled in.
$wpide_bp_required_fields = array( 'Location', 'About me' );

add_action( 'bp_before_member_header', function () use ( $wpide_bp_required_fields ) {
    $user_id = bp_loggedin_user_id();

    if ( ! $user_id || ! bp_is_my_profile() || ! bp_is_active( 'xprofile' ) || bp_is_user_profile_edit() ) {
        return;
    }

    $missing = get_transient( 'wpide_bp_missing_' . $user_id );

    if ( false === $missing ) {
        $missing = array();

        foreach ( $wpide_bp_required_fields as $field ) {
            if ( '' === trim( (string) xprofile_get_field_data( $field, $user_id, 'comma' ) ) ) {
                $missing[] = $field;
            }
        }

        if ( ! bp_get_user_has_avatar( $user_id ) ) {
            $missing[] = 'profile photo';
        }

        set_transient( 'wpide_bp_missing_' . $user_id, $missing, HOUR_IN_SECONDS );
    }

    if ( $missing ) {
        printf(
            '<div class="bp-feedback info wpide-bp-complete"><span class="bp-icon" aria-hidden="true"></span><p>%1$s <a href="%2$s">Complete your profile</a></p></div>',
            esc_html( sprintf( 'Your profile is missing: %s.', implode( ', ', $missing ) ) ),
            esc_url( trailingslashit( function_exists( 'bp_members_get_user_url' ) ? bp_members_get_user_url( $user_id ) : bp_core_get_user_domain( $user_id ) ) . 'profile/edit/' )
        );
    }
} );

add_action( 'xprofile_updated_profile', function ( $user_id ) {
    delete_transient( 'wpide_bp_missing_' . (int) $user_id );
} );
add_action( 'bp_members_avatar_uploaded', function ( $item_id ) {
    delete_transient( 'wpide_bp_missing_' . (int) $item_id );
} );
```

## Notes

List the field names to check in $wpide_bp_required_fields. The result is cached per member for an hour.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "BuddyPress: Remind Members to Complete Their Profile" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
