Code Duplication    Length = 9-9 lines in 2 locations

manager/processors/login.processor.php 1 location

@@ 82-90 (lines=9) @@
79
if($failedlogins >= $failed_allowed && $blockeduntildate > time()) {
80
	@session_destroy();
81
	session_unset();
82
	if($cip = getenv("HTTP_CLIENT_IP")) {
83
		$ip = $cip;
84
	} elseif($cip = getenv("HTTP_X_FORWARDED_FOR")) {
85
		$ip = $cip;
86
	} elseif($cip = getenv("REMOTE_ADDR")) {
87
		$ip = $cip;
88
	} else {
89
		$ip = "UNKNOWN";
90
	}
91
	$log = new EvolutionCMS\Legacy\LogHandler();
92
	$log->initAndWriteLog("Login Fail (Temporary Block)", $internalKey, $username, "119", $internalKey, "IP: " . $ip);
93
	jsAlert($_lang['login_processor_many_failed_logins']);

manager/includes/src/Core.php 1 location

@@ 3451-3459 (lines=9) @@
3448
        $userId = $this->getLoginUserType() == 'manager' ? $this->getLoginUserID() : -$this->getLoginUserID();
3449
3450
        // Get user IP
3451
        if ($cip = getenv("HTTP_CLIENT_IP")) {
3452
            $ip = $cip;
3453
        } elseif ($cip = getenv("HTTP_X_FORWARDED_FOR")) {
3454
            $ip = $cip;
3455
        } elseif ($cip = getenv("REMOTE_ADDR")) {
3456
            $ip = $cip;
3457
        } else {
3458
            $ip = "UNKNOWN";
3459
        }
3460
        $_SESSION['ip'] = $ip;
3461
3462
        $sql = sprintf('REPLACE INTO %s (internalKey, lasthit, ip, sid)