Fixed login/register and added logout.php
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
function hashPassword() {
|
||||
function getUser() {
|
||||
$stmt = $GLOBALS["db"]->prepare("
|
||||
SELECT
|
||||
`password`,
|
||||
|
||||
@@ -52,7 +52,7 @@ function registerAccount() {
|
||||
:email
|
||||
)");
|
||||
|
||||
$hash=password_hash($_POST["password"].(strtolower($_POST["username"])), PASSWORD_DEFAULT);
|
||||
$hash=password_hash($_POST["password"], PASSWORD_DEFAULT);
|
||||
|
||||
$stmt->bindParam(":fname", $_POST["name"]);
|
||||
$stmt->bindParam(":lname", $_POST["surname"]);
|
||||
|
||||
Reference in New Issue
Block a user