Commit 5357afcf authored by Ranindya Paramitha's avatar Ranindya Paramitha
Browse files

[FXING] login

parent 9bd1b549
......@@ -4,12 +4,12 @@
$password = $_POST["password"];
if (userExist($username, $password)){
} else{
header("Location: ../login");
function login() {
function login($username) {
$token = bin2hex(openssl_random_pseudo_bytes(16));
while (!(isTokenExist($token))){
$token = bin2hex(openssl_random_pseudo_bytes(16));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment