Last active
February 2, 2018 08:26
-
-
Save v-skochko/7520318144cc43baf9f603874fd8af4d to your computer and use it in GitHub Desktop.
Wp add user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $userdata = array( | |
| 'user_login' => 'dev_admin', | |
| 'user_url' => "", | |
| 'user_pass' => "dev_pass83", | |
| 'role ' => "administrator" | |
| ); | |
| $user_id = wp_insert_user( $userdata ); | |
| $user = new WP_User($user_id); | |
| $user->set_role('administrator'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment