v0.1.5a - Halffixed createUser.php
This commit is contained in:
parent
b0fd4d4320
commit
12db087308
|
@ -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";
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
|
Loading…
Reference in New Issue