v0.1.5bb made the controller for deleting a user

This commit is contained in:
Victor 2021-06-09 12:41:00 +02:00
parent 8d883793cc
commit 7c5345ac8a
1 changed files with 2 additions and 2 deletions

View File

@ -3,11 +3,11 @@
require "accessControl.php";
require "../../bootstrap.php";
use Backend\Model\Post;
use Backend\Model\User;
if(isset($_POST['delete_id'])){
$id = $_POST['delete_id'];
$findId = Post::query()->findOrFail($id);
$findId = User::query()->findOrFail($id);
if(!$findId->delete()){
return 0;
}else{