I would like to give to all users who register on my website the value 'Register' of a usermeta field which is called user_type.

I'm thinking on adding the next code:

update_user_meta( get_current_user_id() or

$user_id, 'user_type', 'Registrado');

I'm confused because I don't know on which Buddypress / WordPress function or page I need to paste the code, the idea is setting this value when the user completes the register form.

  • I'm looking into inserting the code inside the wp-includes/user.php inside the function wp_insert_user(). Is this a good idea, also i'm going to edit that on my child theme Nov 16 '19 at 11:49
  • It depends on how you're handling the entire process. Your question really needs more detail (which probably means you need to be farther along in the process). If your question isn't specific, you won't get specific answers.
    – butlerblog
    Nov 16 '19 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.