Skip to content

Commit

Permalink
uncomment first domain
Browse files Browse the repository at this point in the history
  • Loading branch information
saltrupiao committed Apr 18, 2022
1 parent a4f139d commit 50d2d4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 50d2d4c

Please sign in to comment.