Code Duplication    Length = 9-9 lines in 2 locations

manager/processors/login.processor.php 1 location

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

manager/includes/src/Core.php 1 location

@@ 3703-3711 (lines=9) @@
3700
        $userId = $this->getLoginUserType() == 'manager' ? $this->getLoginUserID() : -$this->getLoginUserID();
3701
3702
        // Get user IP
3703
        if ($cip = getenv("HTTP_CLIENT_IP")) {
3704
            $ip = $cip;
3705
        } elseif ($cip = getenv("HTTP_X_FORWARDED_FOR")) {
3706
            $ip = $cip;
3707
        } elseif ($cip = getenv("REMOTE_ADDR")) {
3708
            $ip = $cip;
3709
        } else {
3710
            $ip = "UNKNOWN";
3711
        }
3712
        $_SESSION['ip'] = $ip;
3713
3714
        $sql = sprintf('REPLACE INTO %s (internalKey, lasthit, ip, sid)