Hi @liquidonthedrums
You can create a user with wp_create_user function. Once the user is created, you can now use the returned $user_id from the wp_create_user function to make additional meta values to the user. You can add a meta to a new user with the following code:
update_user_meta( $user_id, "role", "subscriber" );
update_user_meta( $user_id, "status", "activated" );
Hope this works for you.
Regards,
Thanks for the response @champsupertramp. Are any of the meta fields required for other functionality to work. eg. any of the UM actions in dropdown the admin/user screen, or the account self-management functionality for users.
I can see that the standard registration form submits all of the entry values in a serialised array. This is stored with the ‘submitted’ meta key. Is this required?
I am trying to stick as close to the default UM registration process in order to harness as much the in-built logic/workflow/functionality as I can, I just need a way for a logged in user to submit a registration form on behalf another user.
Thanks for your time.
Hi @liquidonthedrums
Submitted data is for your reference that can be found in the WP Admin > Users > see “View Info” when you hover on the list of users. That data is only added once but when a user modifies those data in the front-end profile, it won’t be updated since it is only a reference when they submit the data via Register form.
Regards,