Hi,
You can directly create a WordPress user also and it will become BuddyPress member automatically.
Please check: https://wpengineer.com/2054/create-users-automatically-in-wordpress/
Thanks
But I also need to save some xprofile fields programmatically, too. Won’t I eventually have to run bp_core_screen_signup() in order to “fully create” a BP member profile?
When you will use that above link to create user then it is giving you a user_id in return then you can use it to save profile data like this:
xprofile_set_field_data('profile_field', $user_id , 'profile_field_value');
You can write it just after the code where you get user_id in return.
Also please use hook ‘init’ in place of ‘admin_init’ and check a condition in the function if form is posted.
Please try this once and let us know if this works for you not.
Thanks
bp_core_screen_signup() does several other things besides creating the user and saving xprofile fields…it does validation, optionally creates a user blog, provides several action hooks, etc. Are you saying it’s just not practical to use it?
I am not saying that it’s not practical to use but if it is restricting you to create user through this then the workaround can be the solution I have suggested and I think it will send a mail to the user to let him/her know that their account is created on the site.
If you want exactly same functionality like BuddyPress registration then please check this plugin as well https://www.gravityforms.com/add-ons/user-registration/ and this is the link where they notified that it is integrated with BuddyPress https://docs.gravityforms.com/user-registration-add-on/#buddypress-integration
Thanks