I am trying to add a user to WordPress programmatically using information contained in a session from our larger site.
I have verified that
wp_insert_useris being called, no error is thrown, and the expected ID is returned. However, no user is added to the database.
I have also tried the simpler
wp_create_userhowever, it always returns 0.
Someone mentioned adding
include_once(ABSPATH . 'wp-admin/includes/admin.php');That did not resolve the issue. Does anyone have any insight why the user is not being created?
- The topic ‘Programmatically Add User Using wp_insert_user()’ is closed to new replies.