changed the hashing method in the register.php file from something i found online, to phps official hashing methods

This commit is contained in:
hayden 2019-06-30 00:31:39 -05:00
parent c0540bd680
commit e5dabfa2d0
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ if($_SERVER['REQUEST_METHOD'] == 'POST') {
//finally, hash the pasword and insert the new user into the database
//hash with blowfish with 10 rounds
$hash = hash_string($password, 10);
$hash = password_hash($password, PASSWORD_BCRYPT);
$insert_user_sql = "INSERT INTO user (username, password, admin, registered, last_login)
VALUES (?, ?, 0, now(), NULL);";
$stmt = mysqli_prepare($DB_CONN, $insert_user_sql);