Index: wp-admin/install.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-admin/install.php	(date 1569689157000)
+++ wp-admin/install.php	(date 1569756465126)
@@ -103,7 +103,7 @@
 	$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
 	$user_name    = isset( $_POST['user_name'] ) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
 	$admin_email  = isset( $_POST['admin_email'] ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : '';
-
+	$allow_registration = isset( $_POST['registration-enabled'] );
 	if ( ! is_null( $error ) ) {
 		?>
 <h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
@@ -179,7 +179,20 @@
 			<td><input name="admin_email" type="email" id="admin_email" size="25" value="<?php echo esc_attr( $admin_email ); ?>" />
 			<p><?php _e( 'Double-check your email address before continuing.' ); ?></p></td>
 		</tr>
-		<tr>
+        <tr>
+            <th scope="row"><?php _e( 'Enable registration' );  ?></th>
+            <td>
+                <fieldset>
+                    <input id="registration-enabled" type="checkbox" name="registration-enabled" value="1" <?php
+                    checked( true,
+                        $allow_registration ); ?> />
+                    <label for="registration-enabled"><?php _e( 'Allow user to register' ); ?></label><br/>
+                </fieldset>
+            </td>
+        </tr>
+
+
+        <tr>
 			<th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?></th>
 			<td>
 				<fieldset>
@@ -362,6 +375,7 @@
 		$admin_password_check = isset( $_POST['admin_password2'] ) ? wp_unslash( $_POST['admin_password2'] ) : '';
 		$admin_email          = isset( $_POST['admin_email'] ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : '';
 		$public               = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 1;
+		$allow_registration = isset( $_POST['registration-enabled'] );
 
 		// Check email address.
 		$error = false;
@@ -389,6 +403,9 @@
 		if ( $error === false ) {
 			$wpdb->show_errors();
 			$result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language );
+			if ( true === $allow_registration ){
+			    update_option( 'users_can_register', 1);
+            }
 			?>
 
 <h1><?php _e( 'Success!' ); ?></h1>
