From 50d2d4c23e5bd9a3972821f3a5660f9f43564d3a Mon Sep 17 00:00:00 2001 From: saltrupiao Date: Mon, 18 Apr 2022 08:18:18 -0400 Subject: [PATCH] uncomment first domain --- backend/login.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/login.php b/backend/login.php index 75e1f4d..b51edea 100644 --- a/backend/login.php +++ b/backend/login.php @@ -20,9 +20,9 @@ if(password_verify($password, DatabaseConnector::query('SELECT password from user WHERE email=:email', array(':email'=>$emailoruser))[0]['password'])){ $success = 1; $cstrong = True; - // $domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false; - $domain = /*$protocol . */ $_SERVER['HTTP_HOST'] .'/'. $GLOBALS["url_loc"][0]; - var_dump($domain); + $domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false; + //$domain = /*$protocol . */ $_SERVER['HTTP_HOST'] .'/'. $GLOBALS["url_loc"][0]; + var_dump($domain); $token = bin2hex(openssl_random_pseudo_bytes(64, $cstrong)); $user_id = DatabaseConnector::query('SELECT id from user WHERE email=:email', array(':email'=>$emailoruser))[0]['id']; DatabaseConnector::query('INSERT INTO login_tokens (token, user_id) VALUES (:token, :user_id)', array(':token'=>sha1($token), ':user_id'=>$user_id));