wp_insert_user function User Roles
-
Hi i am using the wp_insert_user function
wp_insert_user( array ('ID' => $user_id, 'user_url' => $website, 'user_login' => $user_name, 'user_pass' => $random_password, 'user_email' => '[email protected]', 'user_login' => $user_name, 'first_name' => 'Samuel', 'last_name' => 'East', 'role' => 'Administrator' ) ) ; }
everything works great apart from ‘role’ => ‘Administrator’ when i set it to this it says none.
In the codex it says
role A string used to set the users role.Can anyone explain why this doesnt work i have tried user levels???
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘wp_insert_user function User Roles’ is closed to new replies.