This commit is contained in:
2026-03-15 21:40:25 -05:00
parent d70c0a85fd
commit 5272cb2049
2 changed files with 1 additions and 7 deletions
+1 -5
View File
@@ -26,11 +26,7 @@ class RequireRole
$ranking[$r->role] = $r->rank;
}
$check = UserRole::where('character_id', auth()->user()->character_id)->get();
if($check->isEmpty()) {
abort(403, "No users found in the database");
return $next($request);
}
$check = UserRole::where('character_id', auth()->user()->character_id)->get(['role']);
if(!isset($check[0]->role)) {
abort(403, "You don't have any roles.");