Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Seems logical for any other network, not for buddypress though :(

We all know the extended user profiles in buddypress - problem is, even though some fields are marked as required, that "required" seems to have no real significance for buddypress developers. So we have some "required" fields, which nobody EVER asks the user to fill in ... "Great" job so far ...

So the question is... how can we force the newly registered user to first fill in all those required fields from the extended user profile, BEFORE he is able to use anything on the site !?

Like he registers with name, prename, email and once he logs in he will be presented with a page/screen where he will have to first complete all the other missing required fileds, before he'll be able to see ANY content on the site !!?

Anyone please an idea about how to achieve this? It's more than 1 year I think I search for a solution ... :-(

share|improve this question

closed as off-topic by Pieter Goosen, toscho Aug 4 at 20:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Did you try the solution from @Kaiser below? That is the making of pretty much what you need, seeing as you've been searching for a year. –  userabuser Oct 13 '12 at 6:40

4 Answers 4

Use wp_redirect() and admin_url() to redirect the user to his profile page if the custom buddypress user meta data isn't completely filled.

From another answer, I've seen that there's the following function: bp_get_profile_field_data(). So you can easily build a template tag, that gives you either the full buddy user meta data set, or simply a FALSE back.

If you get a FALSE back, then you can redirect the user. On the get_user_metadata-hook, you already got the global $current_user set, so you can do the redirect on the template_redirect-hook.

function wpse57054_is_buddy_complete( $buddy_user_fields = array() )
{
    // convert single field keys to arrays
    $buddy_user_fields = (array) $buddy_user_fields;

    foreach ( $buddy_user_fields as $buddy_user_meta )
    {
        $data = bp_get_profile_field_data( array( 
            'field'   => $buddy_user_meta,
            'user_id' => wp_get_current_user()->id,
        ) );
        // One field empty/not filled: Abort and return FALSE
        if ( empty( $data ) )
            return false;
    }

    // Return the whole data set
    return $data;
}
share|improve this answer

I have just released in the Repository my own plugin, BP Force Profile.

A plugin to force buddypress users to complete the required fields of their profiles. Each users with a non complete profile are redirecting to their profile page and a notice is displayed with the required fields.

share|improve this answer
1  
Please do not post copy/paste answers, explain how your plugin addresses each specific question. Overly pushy self-promotion may result in your answers removed. –  Rarst Dec 8 '12 at 19:29
    
I've just flagged the other cloned answer. Welcome to WordPress Answers, but please play by the rules... Nice to see your contribution to the Repository, this article may be helpful. Cheers! –  brasofilo Dec 8 '12 at 19:45

Sounds like you should instead be putting these fields in the registration page, so that they don't even get a username or password until they give you this information.

Otherwise it becomes a pain for both you and the user.

share|improve this answer
1  
I already have that, makes the registration page HUGE and kills the conversion by 90% I think. Than't why I need it as described above. So at least I get the email and can do some follow-up ... Make it as easy and short as possible for the user to "get in" and follow-up once you have at least his email –  Carry Jun 30 '12 at 23:52
    
The issue is that this will change how you have to measure your conversion rate (# of users that have filled in everything) and will cause just as much damage. –  Tyler Carter Jun 30 '12 at 23:55
    
From the way you described, a user can't use any of your site until all the fields are filled in. Whether they have to do it up in front or in sections, it still will significantly hurt your conversion rate. –  Tyler Carter Jun 30 '12 at 23:57
    
Trust me, it is not the same. Have enough experience in lead generation, and I can tell you that follow-ups - if done properly - can do wonders. It's not the same to lose a prospect upfront (like you'll never know he was there at all) and have him quit in the middle. In the second case you KNOW he was interested so you can give him a "second call". For a business site, chances he will convert in a second attempt are really good. –  Carry Jul 1 '12 at 0:07
    
I'd be fine with a split registration form too (like grab the name & email on the first page and the rest of the fields on a second page) - provided the email gets saved in the database and I can do the follow-up - but I guess this would be even more complicated than the 1st idea (the one in my original question) ... –  Carry Jul 1 '12 at 0:16

Not used it myself, but one of the features of the PRO version of BuddyPress Group-O-Matic is that members can't navigate a BP site unless their profile is complete.

rt.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.