Code Duplication    Length = 11-11 lines in 2 locations

_inc/class.jetpack-provision.php 1 location

@@ 81-91 (lines=11) @@
78
		$auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) );
79
80
		/** This filter is documented in class.jetpack-cli.php */
81
		if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
82
			$redirect_uri = add_query_arg(
83
				array(
84
					'action'      => 'jetpack-sso',
85
					'redirect_to' => rawurlencode( admin_url() ),
86
				),
87
				wp_login_url() // TODO: come back to Jetpack dashboard?
88
			);
89
		} else {
90
			$redirect_uri = admin_url();
91
		}
92
93
		$request_body = array(
94
			'jp_version'   => JETPACK__VERSION,

class.jetpack-xmlrpc-server.php 1 location

@@ 324-334 (lines=11) @@
321
		$auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) );
322
323
		/** This filter is documented in class.jetpack-cli.php */
324
		if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
325
			$redirect_uri = add_query_arg(
326
				array(
327
					'action'      => 'jetpack-sso',
328
					'redirect_to' => rawurlencode( admin_url() ),
329
				),
330
				wp_login_url() // TODO: come back to Jetpack dashboard?
331
			);
332
		} else {
333
			$redirect_uri = admin_url();
334
		}
335
336
		// Generate secrets.
337
		$role    = Jetpack::translate_user_to_role( $user );