0

Hi before this I using wp_create_user. It was working properly.

Now I change it little bit of my code to use wp_insert_user. I change because i have custom field to set but now I using standard field , email , pass and username but got problem when submit

The problem are

Notice: Trying to access array offset on value of type null in /wp-includes/user.php on line 1764
Notice: Trying to access array offset on value of type null in /wp-includes/user.php on line 1767

my code https://codepen.io/rusydi-hakim/pen/XWNeapx

2
  • I think this is just a typo. You're setting up array $user_data with an underscore but calling $user_id = wp_insert_user( $userdata ) ; with no underscore in $userdata. – Rup Feb 22 at 9:42
  • Okay thanks, it works – Rusydi Feb 22 at 12:48

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.