Add patch to rename user_roles_id to roles_id, update related classes

This commit is contained in:
DariusIII
2018-08-01 10:46:21 +02:00
parent f80408a50e
commit 00f09c4a6e
10 changed files with 22 additions and 17 deletions
+3 -3
View File
@@ -225,7 +225,7 @@ class BasePageController extends Controller
protected function setUserPreferences(): void
{
$this->userdata['categoryexclusions'] = User::getCategoryExclusion(Auth::id());
$this->userdata['rolecategoryexclusions'] = RoleExcludedCategory::getRoleCategoryExclusion($this->userdata['user_roles_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) {
@@ -256,7 +256,7 @@ class BasePageController extends Controller
if ($sab->integratedBool !== false && $sab->url !== '' && $sab->apikey !== '') {
$this->smarty->assign('sabapikeytype', $sab->apikeytype);
}
switch ((int) $this->userdata['user_roles_id']) {
switch ((int) $this->userdata['roles_id']) {
case User::ROLE_ADMIN:
$this->smarty->assign('isadmin', 'true');
break;
@@ -272,7 +272,7 @@ class BasePageController extends Controller
$role = User::ROLE_USER;
if (! empty($this->userdata)) {
$role = $this->userdata['user_roles_id'];
$role = $this->userdata['roles_id'];
}
$content = new Contents();