@noobiestrikesagain
7 years, 2 months ago
Hey,
I’m trying to retrieve meta data from Signup form using the user id. (wp_signup table)
I have tried various methods like:
function bp_user_field ($user_id){ $usermeta = BP_Signup::get( array('meta'=> $usermeta ) ); $usermeta2 = array( 'signup' => $bp->signup->meta); $usermeta3 = $user['meta'] update_user_meta($userid, 'irt_field', $usermeta['irt_field']); return $user_id; } add_filter( 'bp_core_activated_user', 'bp_user_field',1 );
I have verified that my data was successfully stored to $usermeta that I’m trying to fetch.
Note: I have already checked https://buddypress.org/support/topic/how-to-add-custom-usermeta-to-registration but couldn’t make it work.
Thanks in Advance!
@henrywright
Try
$user = get_userdata( $user_id ); $signup = BP_Signup::get( array( 'user_login' => $user->user_login ) );
Thanks.
This works!