From 29477e67ede12347b153e2255325327374e1b073 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Tue, 9 Dec 2025 01:43:12 +0500 Subject: feat: new configuration --- account/login/index.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'account/login/index.php') diff --git a/account/login/index.php b/account/login/index.php index 7aef703..b4223f2 100644 --- a/account/login/index.php +++ b/account/login/index.php @@ -21,13 +21,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { $password = $_POST["password"]; $remember = intval($_POST["remember"] ?? "0") != 0; - $db = new PDO(DB_URL, DB_USER, DB_PASS); + $db = new PDO(CONFIG['database']['url'], CONFIG['database']['user'], CONFIG['database']['pass']); $stmt = $db->prepare("SELECT secret_key, password FROM users WHERE username = ? AND password IS NOT NULL"); $stmt->execute([$username]); if ($row = $stmt->fetch()) { if (password_verify($password, $row["password"])) { - setcookie("secret_key", $row["secret_key"], $remember ? (time() + ACCOUNT_COOKIE_MAX_LIFETIME) : 0, "/"); + setcookie("secret_key", $row["secret_key"], $remember ? (time() + CONFIG['account']['maxcookielifetime']) : 0, "/"); header("Location: /account"); exit; } else { @@ -44,7 +44,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { - Login - <?php echo INSTANCE_NAME ?> + Login - <?php echo CONFIG['instance']['name'] ?> @@ -57,7 +57,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
@@ -75,7 +75,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
- + Register
@@ -83,11 +83,11 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
- +
Login with Twitch

Logging in via Twitch gives you the ability to use - emotes in your Twitch chat. + emotes in your Twitch chat.

-- cgit v1.2.3