Skip to content

Commit

Permalink
fix: Directly pass empty or missing password to WordPress (#232)
Browse files Browse the repository at this point in the history
To ensure WordPress auto-generates the password and can send the
password to the user through email.

Signed-off-by: Souptik Datta <[email protected]>
  • Loading branch information
Souptik2001 authored Aug 24, 2023
1 parent b70efab commit 0852e36
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Core_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,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." );
Expand Down

0 comments on commit 0852e36

Please sign in to comment.