.
This commit is contained in:
@@ -64,7 +64,7 @@ else if ($_SESSION["needs_auth"]===false && $_SESSION["mfa_authenticated"]==1 &&
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
//update last login
|
//update last login
|
||||||
$ip=$_SERVER["HTTP_X_FORWARDED_FOR"];
|
$ip=trim(explode(",",$_SERVER["HTTP_X_FORWARDED_FOR"])[0]);
|
||||||
$date=date('Y-m-d H:i:s');
|
$date=date('Y-m-d H:i:s');
|
||||||
$last_login_msg=$date." from ".$ip;
|
$last_login_msg=$date." from ".$ip;
|
||||||
$sql="UPDATE users SET last_login = ? WHERE id = ?";
|
$sql="UPDATE users SET last_login = ? WHERE id = ?";
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ mysqli_stmt_fetch($stmt);
|
|||||||
mysqli_stmt_close($stmt);
|
mysqli_stmt_close($stmt);
|
||||||
//send telegram message
|
//send telegram message
|
||||||
$device = $_SERVER['HTTP_USER_AGENT'];
|
$device = $_SERVER['HTTP_USER_AGENT'];
|
||||||
$ip=$_SERVER["REMOTE_ADDR"];
|
//$ip=$_SERVER["REMOTE_ADDR"];
|
||||||
|
$ip=trim(explode(",",$_SERVER["HTTP_X_FORWARDED_FOR"])[0]);
|
||||||
$location=get_location_from_ip($ip);
|
$location=get_location_from_ip($ip);
|
||||||
$date=date('Y-m-d H:i:s');
|
$date=date('Y-m-d H:i:s');
|
||||||
$token=bin2hex(random_bytes(128));
|
$token=bin2hex(random_bytes(128));
|
||||||
|
|||||||
Reference in New Issue
Block a user