Skip to content

Commit

Permalink
πŸ› Bug fix on tokens page
Browse files Browse the repository at this point in the history
Fixed token page not redirecting
  • Loading branch information
anditv21 committed Jul 31, 2023
1 parent cf6871a commit 8f0010b
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/user/tokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,22 @@
exit();
}
}

if (isset($_POST["password"])) {
$password = Util::securevar($_POST["password"]);

$token = Util::securevar($_COOKIE['login_cookie']);
$error = $user->deleteother($token, $password);
if (!$error) {
header('location: tokens.php');
exit();
}
header('location: tokens.php');
exit();
}


if (isset($_POST["setnote"])) {
$selectedTokenId = Util::securevar($_POST["setnote"]);
$note = Util::securevar($_POST["note"]);
$error = $user->setTokenNoteById($selectedTokenId, $note);
if (!$error) {
header('location: tokens.php');
exit();
}
header('location: tokens.php');
exit();
}
}

Expand Down

0 comments on commit 8f0010b

Please sign in to comment.