Forked from projoktibangla/gist:293a03788f37faa4789e
Created
January 17, 2017 00:20
-
-
Save gabrielcury/dcb76451c2606543b8d86399b262fb7d to your computer and use it in GitHub Desktop.
wp user registration without dashboard
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
| <?php | |
| $newuser=wp_create_user('username', 'pass', 'email'); | |
| $userrole=new WP_User($newuser); | |
| $userrole -> ser_role('administrator'); | |
| //or | |
| $userrole=new WP_User(wp_create_user('username', 'pass', 'email')); | |
| $userrole -> ser_role('administrator'); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment