Update handling of user and role disabled categories

This commit is contained in:
DariusIII
2018-08-07 01:20:57 +02:00
parent 23fa6045cd
commit 889d426c85
7 changed files with 46 additions and 216 deletions
@@ -11,7 +11,6 @@ use App\Models\Category;
use App\Models\Settings;
use Blacklight\Contents;
use App\Models\Forumpost;
use App\Models\RoleExcludedCategory;
use Illuminate\Support\Facades\Auth;
use Illuminate\Pagination\LengthAwarePaginator;
@@ -225,7 +224,6 @@ class BasePageController extends Controller
protected function setUserPreferences(): void
{
$this->userdata['categoryexclusions'] = User::getCategoryExclusion(Auth::id());
$this->userdata['rolecategoryexclusions'] = RoleExcludedCategory::getRoleCategoryExclusion($this->userdata['roles_id']);
// Change the theme to user's selected theme if they selected one, else use the admin one.
if ((int) Settings::settingValue('site.main.userselstyle') === 1) {