From 6576f28469df38ff115e1fa44a4741c0398def7d Mon Sep 17 00:00:00 2001 From: Souptik Datta Date: Tue, 23 May 2023 02:49:27 +0530 Subject: [PATCH] fix: Directly pass empty or missing password to WordPress To ensure WordPress auto-generates the password and can send the password to the user through email. Signed-off-by: Souptik Datta --- src/Core_Command.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Core_Command.php b/src/Core_Command.php index 2024fa9e..911f8285 100644 --- a/src/Core_Command.php +++ b/src/Core_Command.php @@ -637,9 +637,7 @@ function wp_new_blog_notification() { } $public = true; - $password = empty( $args['admin_password'] ) - ? wp_generate_password( 18 ) - : $args['admin_password']; + $password = $args['admin_password']; if ( ! is_email( $args['admin_email'] ) ) { WP_CLI::error( "The '{$args['admin_email']}' email address is invalid." );