Skip to content

Commit 0852e36

Browse files
authored
fix: Directly pass empty or missing password to WordPress (#232)
To ensure WordPress auto-generates the password and can send the password to the user through email. Signed-off-by: Souptik Datta <[email protected]>
1 parent b70efab commit 0852e36

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Core_Command.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,7 @@ function wp_new_blog_notification() {
652652
}
653653

654654
$public = true;
655-
$password = empty( $args['admin_password'] )
656-
? wp_generate_password( 18 )
657-
: $args['admin_password'];
655+
$password = $args['admin_password'];
658656

659657
if ( ! is_email( $args['admin_email'] ) ) {
660658
WP_CLI::error( "The '{$args['admin_email']}' email address is invalid." );

0 commit comments

Comments
 (0)