Skip to content

Commit

Permalink
Add Query Monitor capability to dev user
Browse files Browse the repository at this point in the history
  • Loading branch information
ethitter committed Jul 22, 2024
1 parent ac62ea6 commit 1ac9d8d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classes/class-customizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use PMC\Global_Functions\Traits\Singleton;
use PMC\Global_Functions\VIP_Go_Sync_Cleanup;
use WP_CLI;
use WP_User;

/**
* Class Customizations.
Expand Down Expand Up @@ -150,14 +151,17 @@ public function remove_superfluous_vip_tables(): void {
public function add_dev_user(): void {
WP_CLI::line( ' * Adding `pmcdev` user.' );

wp_insert_user(
$id = wp_insert_user(
[
'user_login' => 'pmcdev',
'user_pass' => 'pmcdev',
'user_email' => '[email protected]',
'role' => 'administrator',
]
);

$user = new WP_User( $id );
$user->add_cap( 'view_query_monitor' );
}

/**
Expand Down

0 comments on commit 1ac9d8d

Please sign in to comment.