Code Duplication    Length = 11-11 lines in 2 locations

class.jetpack-xmlrpc-server.php 1 location

@@ 246-256 (lines=11) @@
243
		$auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) );
244
245
		/** This filter is documented in class.jetpack-cli.php */
246
		if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
247
			$redirect_uri = add_query_arg(
248
				array(
249
					'action'      => 'jetpack-sso',
250
					'redirect_to' => rawurlencode( admin_url() ),
251
				),
252
				wp_login_url() // TODO: come back to Jetpack dashboard?
253
			);
254
		} else {
255
			$redirect_uri = admin_url();
256
		}
257
258
		// Generate secrets.
259
		$role    = Jetpack::translate_user_to_role( $user );

_inc/class.jetpack-provision.php 1 location

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