v0.1.5ba - deleteUser
This commit is contained in:
parent
3f03f05892
commit
8d883793cc
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require "accessControl.php";
|
||||||
|
require "../../bootstrap.php";
|
||||||
|
|
||||||
|
use Backend\Model\Post;
|
||||||
|
|
||||||
|
if(isset($_POST['delete_id'])){
|
||||||
|
$id = $_POST['delete_id'];
|
||||||
|
$findId = Post::query()->findOrFail($id);
|
||||||
|
if(!$findId->delete()){
|
||||||
|
return 0;
|
||||||
|
}else{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue