Programmatically Add User Using wp_insert_user()
-
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_user
is 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_user
however, 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?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Programmatically Add User Using wp_insert_user()’ is closed to new replies.