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’
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.