v0.1.5a - Halffixed createUser.php

This commit is contained in:
Anders 2021-06-09 12:36:09 +02:00
parent b0fd4d4320
commit 12db087308
1 changed files with 4 additions and 4 deletions

View File

@ -2,10 +2,10 @@
//require our bootstrap file for database connection
require "../../bootstrap.php";
use Backend\Model\Post;
use Backend\Model\User;
if(isset($_SESSION['permission'])){
$user = new Post();
//if(isset($_SESSION['permission'])){
$user = new User();
$user->name = $_POST['name'];
$hashPass = password_hash($_POST['password'], PASSWORD_DEFAULT);
$user->password = $hashPass;
@ -15,4 +15,4 @@ if(isset($_SESSION['permission'])){
}else{
echo "saved";
}
}
//}