Code Duplication    Length = 6-7 lines in 2 locations

_inc/class.jetpack-provision.php 1 location

@@ 242-247 (lines=6) @@
239
			? array( 'sso' )
240
			: array();
241
242
		if ( $active_modules = Jetpack_Options::get_option( 'active_modules' ) ) {
243
			Jetpack::delete_active_modules();
244
			Jetpack::activate_default_modules( 999, 1, array_merge( $active_modules, $other_modules ), false );
245
		} else {
246
			Jetpack::activate_default_modules( false, false, $other_modules, false );
247
		}
248
	}
249
250
	private static function verify_token( $access_token ) {

class.jetpack.php 1 location

@@ 7249-7255 (lines=7) @@
7246
			? array( 'sso' )
7247
			: array();
7248
7249
		if ( $active_modules = Jetpack_Options::get_option( 'active_modules' ) ) {
7250
			Jetpack::delete_active_modules();
7251
7252
			Jetpack::activate_default_modules( 999, 1, array_merge( $active_modules, $other_modules ), $redirect_on_activation_error, false );
7253
		} else {
7254
			Jetpack::activate_default_modules( false, false, $other_modules, $redirect_on_activation_error, false );
7255
		}
7256
7257
		// Since this is a fresh connection, be sure to clear out IDC options
7258
		Jetpack_IDC::clear_all_idc_options();