Skip to:
Content
Pages
Categories
Search
Top
Bottom

Where is the code that processes input from the BP registration form?

Viewing 5 replies - 1 through 5 (of 5 total)

  • r-a-y
    Keymaster

    @r-a-y

    Check:

    /wp-content/plugins/buddypress/bp-core/bp-core-signup.php


    peterverkooijen
    Participant

    @peterverkooijen

    Thanks r-a-y.

    I can’t make much sense of most of that code. Does function bp_core_signup_show_user_form take the input from the form? Or does it only output the form? I guess the latter.

    I think the code that actually processes the input is in bp_xprofile/bp-xprofile-classes.php, Class BP_XProfile_ProfileData etc. Or bp-xprofile-signup.php?

    Back to the other thread to see if it gets me any further…


    arezki
    Participant

    @arezki

    Speaking of which, any idea how to grab the members’ data and export them into a CSV, XLS, or whatever format for data mining? I’d love to be able to do members’ profiling based on their registration. I know WP lists the members by name and email address, but not more than that.

    Cheers

    A


    peterverkooijen
    Participant

    @peterverkooijen

    arezki, there is a Users to CSV plugin. Not sure if it also exports data from Buddypress’ xprofile table, but perhaps you could expand it.

    Getting data from the database is relatively simple. You could just write your own SQL queries as well, if you can figure out how and where the data is stored, which is not at all straightforward in the wp-wpmu-bp patchwork.

    My original question was about something else; how does data move from registration form to the database?

    I’m trying to identify what bit of code “picks up” the input from the ‘* Name’ field, id/name = “field_1”. Is it this function?:

    function xprofile_extract_signup_meta( $user_id, $meta ) {
    // Extract signup meta fields to fill out profile
    $field_ids = $meta['xprofile_field_ids'];
    $field_ids = explode( ',', $field_ids );

    // Loop through each bit of profile data and save it to profile.
    for ( $i = 0; $i < count($field_ids); $i++ ) {
    if ( empty( $field_ids[$i] ) ) continue;

    $field_value = $meta["field_{$field_ids[$i]}"];

    $field = new BP_XProfile_ProfileData();
    $field->user_id = $user_id;
    $field->value = $field_value;
    $field->field_id = $field_ids[$i];
    $field->last_updated = time();

    $field->save();
    }

    update_usermeta( $user_id, 'last_activity', time() );
    }

    For a plugin I need SOMETHING HERE = $fullname. The SOMETHING HERE should be the input value for field_1 from the registration form.

    I get lost in the php in the array stuff. Please help if anyone can give any more clues!


    arezki
    Participant

    @arezki

    Peterverkooijen… all appreciated. Basic but brilliant. Best of luck with your issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Where is the code that processes input from the BP registration form?’ is closed to new replies.
Skip to toolbar