Code Duplication    Length = 2-2 lines in 7 locations

Sources/LogInOut.php 3 locations

@@ 86-87 (lines=2) @@
83
	global $cookiename, $modSettings, $context, $sourcedir, $maintenance;
84
85
	// Check to ensure we're forcing SSL for authentication
86
	if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
87
		fatal_lang_error('login_ssl_required');
88
89
	// Load cookie authentication stuff.
90
	require_once($sourcedir . '/Subs-Auth.php');
@@ 443-444 (lines=2) @@
440
	if (!empty($_POST['tfa_code']) && empty($_POST['tfa_backup']))
441
	{
442
		// Check to ensure we're forcing SSL for authentication
443
		if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
444
			fatal_lang_error('login_ssl_required');
445
446
		$code = $_POST['tfa_code'];
447
@@ 466-467 (lines=2) @@
463
	elseif (!empty($_POST['tfa_backup']))
464
	{
465
		// Check to ensure we're forcing SSL for authentication
466
		if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
467
			fatal_lang_error('login_ssl_required');
468
469
		$backup = $_POST['tfa_backup'];
470

Sources/Profile.php 1 location

@@ 598-599 (lines=2) @@
595
		if ($check_password)
596
		{
597
			// Check to ensure we're forcing SSL for authentication
598
			if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
599
				fatal_lang_error('login_ssl_required');
600
601
			// You didn't even enter a password!
602
			if (trim($_POST['oldpasswrd']) == '')

Sources/Security.php 1 location

@@ 58-59 (lines=2) @@
55
	if (isset($_POST[$type . '_pass']))
56
	{
57
		// Check to ensure we're forcing SSL for authentication
58
		if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
59
			fatal_lang_error('login_ssl_required');
60
61
		checkSession();
62

Sources/Register.php 1 location

@@ 229-230 (lines=2) @@
226
	validateToken('register');
227
228
	// Check to ensure we're forcing SSL for authentication
229
	if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
230
		fatal_lang_error('register_ssl_required');
231
232
	// Start collecting together any errors.
233
	$reg_errors = array();

Sources/Profile-Modify.php 1 location

@@ 4126-4127 (lines=2) @@
4123
	if (empty($user_settings['tfa_secret']) && $context['user']['is_owner'])
4124
	{
4125
		// Check to ensure we're forcing SSL for authentication
4126
		if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
4127
			fatal_lang_error('login_ssl_required');
4128
4129
		// In some cases (forced 2FA or backup code) they would be forced to be redirected here,
4130
		// we do not want too much AJAX to confuse them.