updating login message

This commit is contained in:
jakani24
2024-06-06 15:57:52 +02:00
parent 3e3b9b0911
commit 341002426f
2 changed files with 3 additions and 2 deletions

View File

@@ -305,7 +305,8 @@ async function checkRegistration() {
$_SESSION["allow_pw_login"]=$row["allow_pw_login"]; $_SESSION["allow_pw_login"]=$row["allow_pw_login"];
$_SESSION["send_login_message"]=$row["send_login_message"]; $_SESSION["send_login_message"]=$row["send_login_message"];
if($_SESSION["send_login_message"]=="1"){ if($_SESSION["send_login_message"]=="1"){
$ip = $_SERVER['HTTP_CLIENT_IP']; $ip = $_SERVER['REMOTE_ADDR'];
$username=$row["username"];
send_to_user("[LOGIN WARNING]\nHello $username\nSomebody has logged into Cyberhex with your account.\nIf this was you, you can ignore this message. Else please take steps to secure your account!\nIP: $ip\n",$username); send_to_user("[LOGIN WARNING]\nHello $username\nSomebody has logged into Cyberhex with your account.\nIf this was you, you can ignore this message. Else please take steps to secure your account!\nIP: $ip\n",$username);
} }
echo '<script>window.location.href = "/system/secure_zone/php/index.php";</script>'; echo '<script>window.location.href = "/system/secure_zone/php/index.php";</script>';

View File

@@ -96,7 +96,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
?> ?>
<label for="pw_login">Allow password logins. (Please make shure you have a passkey, if you disable this!)</label> <label for="pw_login">Allow password logins. (Please make shure you have a passkey, if you disable this!)</label>
</div> </div>
<br>
<div class="form-group"> <div class="form-group">
<?php <?php
if($_SESSION["send_login_message"]==1){ if($_SESSION["send_login_message"]==1){