I have this WP error message instead of user_id : Not enough data to create this user. I am trying to create a new user programmatically. This code works on another project I worked on, but returns an error on the current one am working on.
the code
$user_id = wp_create_user( $username, $password, $email );
2
Answers
Turns out the issue was WP Cerber Plugin. Disabled it and now everything works.
It means that the $user does not return the user object, but false which means wp_create_user is probably returning an error object.
Check the wp_create_user arguments!