Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: New User Actions for BP


techguy
Participant

@crashutah

Thanks for the help on this r-a-y. I’m getting pretty close. So, I’ve changed the user creation to the following so that it will do the regular user creation if it’s not BP and it will do bp_core_signup_user() for BP. Here’s the code:

if (!defined (“BP_VERSION”)) /* Not compatible with BuddyPress. */

{

$user_login_id = wp_insert_user($user_data);

} else {

//$usermeta = ”;

$user_login_id = bp_core_signup_user($user_data[‘user_login’], $user_data[‘user_pass’], $user_data[‘user_email’], $usermeta);

}

The question I have is how can I load $usermeta with the meta data for that user? I have this other data available to be put into the $usermeta:

$user_data[‘first_name’] = $fbuser[‘first_name’];

$user_data[‘last_name’] = $fbuser[‘last_name’];

$user_data[‘user_nicename’] = $fbuser[‘name’];

$user_data[‘display_name’] = $fbuser[‘first_name’];

$user_data[‘user_url’] = $fbuser[“profile_url”];

I also think there might be something wrong with the way I’m passing the email into bp_core_signup_user(). Not sure if that makes a difference or not.

Skip to toolbar