Code Duplication    Length = 2-2 lines in 7 locations

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/Profile-Modify.php 1 location

@@ 4060-4061 (lines=2) @@
4057
	if (empty($user_settings['tfa_secret']) && $context['user']['is_owner'])
4058
	{
4059
		// Check to ensure we're forcing SSL for authentication
4060
		if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
4061
			fatal_lang_error('login_ssl_required');
4062
4063
		// In some cases (forced 2FA or backup code) they would be forced to be redirected here,
4064
		// we do not want too much AJAX to confuse them.

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/LogInOut.php 3 locations

@@ 95-96 (lines=2) @@
92
	global $cookiename, $modSettings, $context, $sourcedir, $maintenance;
93
94
	// Check to ensure we're forcing SSL for authentication
95
	if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
96
		fatal_lang_error('login_ssl_required');
97
98
	// Load cookie authentication stuff.
99
	require_once($sourcedir . '/Subs-Auth.php');
@@ 461-462 (lines=2) @@
458
	if (!empty($_POST['tfa_code']) && empty($_POST['tfa_backup']))
459
	{
460
		// Check to ensure we're forcing SSL for authentication
461
		if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
462
			fatal_lang_error('login_ssl_required');
463
464
		$code = $_POST['tfa_code'];
465
@@ 484-485 (lines=2) @@
481
	elseif (!empty($_POST['tfa_backup']))
482
	{
483
		// Check to ensure we're forcing SSL for authentication
484
		if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
485
			fatal_lang_error('login_ssl_required');
486
487
		$backup = $_POST['tfa_backup'];
488