Skip to content
Snippets Groups Projects
Commit 261cdf39 authored by Ulung32's avatar Ulung32 Committed by DewanaGustavus
Browse files

fix redirect if not login

parent d9347f81
No related merge requests found
......@@ -5,7 +5,9 @@
class ProductController extends Controller{
public function index($id){
if($this->userRole !== 1) {
throw new Exception("You are not allowed to view this page", 405);
// throw new Exception("You are not allowed to view this page", 405);
header("Location: /login");
exit();
}
$productModel = $this->model("ProductModel");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment