wp_inser_user and role issue
-
Hello,
I use below code to add new user. Everything works fine except that I am not able to set role of the new_user by my own. What I am doing wrong?
require('./wp-blog-header.php'); require('./wp-includes/registration.php'); $new_user = array(); $new_user['user_pass'] = 'someone'; $new_user['user_login'] = 'someone'; $new_user['user_email'] = '[email protected]'; $new_user['display_name'] = 'someone'; $new_user['role'] = 'editor'; wp_insert_user($new_user);
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘wp_inser_user and role issue’ is closed to new replies.