Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add to registration


  • SFMichael
    Participant

    @sfmichael

    I’m basically trying to add several checkboxs to the registration page so the user can choose what blogs to join however I am unsure of where I can find the code to submit this.

    Or do i simply use a function to do what i want it to do?

    Thanks

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

  • SFMichael
    Participant

    @sfmichael

    First function adds code to meta in wp-signups works fine.

    Second function should get this meta which is does however i cant access anything inside it using the likes of $signup[‘meta’] or $signup[‘$user_id’]

    add_filter( 'bp_signup_usermeta', 'custom_add_signup_meta' );

    function custom_add_signup_meta ($meta)
    {
    // create an array of custom meta fields
    $meta['user_blogs'] = $_POST['blogs'];

    if($meta != null)
    {
    return $meta;
    }

    }

    add_filter( 'bp_core_activate_account', 'add_user_to_blogs');

    function add_user_to_blogs($signup)
    {
    global $bp, $wpdb;
    $role = 'bbp_participant';

    echo 'ALL = '.print_r($signup).'';

    foreach ($signup['meta']['user_blogs'] as $key => $value )
    {
    //Stuff
    }

    }

    Any ideas?

    When i output $signup i get an array within ‘WP_Error Object’


    SFMichael
    Participant

    @sfmichael

    When i output $signup i get an array within ‘WP_Error Object’

    That only happened because i was simply refreshing the activation page

    other wise when i print signup i get one.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add to registration’ is closed to new replies.
Skip to toolbar