Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
3f03f05892
|
@ -2,10 +2,10 @@
|
||||||
//require our bootstrap file for database connection
|
//require our bootstrap file for database connection
|
||||||
require "../../bootstrap.php";
|
require "../../bootstrap.php";
|
||||||
|
|
||||||
use Backend\Model\Post;
|
use Backend\Model\User;
|
||||||
|
|
||||||
if(isset($_SESSION['permission'])){
|
//if(isset($_SESSION['permission'])){
|
||||||
$user = new Post();
|
$user = new User();
|
||||||
$user->name = $_POST['name'];
|
$user->name = $_POST['name'];
|
||||||
$hashPass = password_hash($_POST['password'], PASSWORD_DEFAULT);
|
$hashPass = password_hash($_POST['password'], PASSWORD_DEFAULT);
|
||||||
$user->password = $hashPass;
|
$user->password = $hashPass;
|
||||||
|
@ -15,4 +15,4 @@ if(isset($_SESSION['permission'])){
|
||||||
}else{
|
}else{
|
||||||
echo "saved";
|
echo "saved";
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
|
|
Loading…
Reference in New Issue