[ADDED] Use getCurrentIP on IP check

This commit is contained in:
Sebastian Grewe 2014-02-20 08:26:58 +01:00
parent 8bd469ba5d
commit 28d114b099

View File

@ -99,7 +99,7 @@ if (count(@$_SESSION['last_ip_pop']) == 2) {
$ip = filter_var($data[0], FILTER_VALIDATE_IP);
$time = date("l, F jS \a\\t g:i a", $data[1]);
$closelink = "<a href='index.php?page=dashboard&clp=1' style='float:right;padding-right:14px;'>Close</a>";
if (@$_SESSION['AUTHENTICATED'] && $_SESSION['last_ip_pop'][0] !== $_SERVER['REMOTE_ADDR']) {
if (@$_SESSION['AUTHENTICATED'] && $_SESSION['last_ip_pop'][0] !== $user->getCurrentIP()) {
$_SESSION['POPUP'][] = array('CONTENT' => "You last logged in from <b>$ip</b> on $time $closelink", 'TYPE' => 'warning');
} else {
$_SESSION['POPUP'][] = array('CONTENT' => "You last logged in from <b>$ip</b> on $time $closelink", 'TYPE' => 'info');