diff --git a/Changelog b/Changelog index 92ecb2f3b..b6dd24b31 100755 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +2017-10-17 DariusIII + * Fix: Wrong model used in getRoleCategoryExclusion function 2017-10-16 DariusIII * Chg: Update laravel/framework and phpunit to latest versions * Fix: Fix path to jquery-goup in Gentele theme diff --git a/app/Models/RoleExcludedCategory.php b/app/Models/RoleExcludedCategory.php index 0e9a40bf8..bc66b03d1 100644 --- a/app/Models/RoleExcludedCategory.php +++ b/app/Models/RoleExcludedCategory.php @@ -6,5 +6,7 @@ use Illuminate\Database\Eloquent\Model; class RoleExcludedCategory extends Model { - // + protected $dateFormat = false; + + protected $guarded = []; } diff --git a/nntmux/Users.php b/nntmux/Users.php index a1c01f230..a29a94d32 100755 --- a/nntmux/Users.php +++ b/nntmux/Users.php @@ -2,6 +2,7 @@ namespace nntmux; +use App\Models\RoleExcludedCategory; use nntmux\db\DB; use Carbon\Carbon; use App\Models\User; @@ -1001,7 +1002,7 @@ class Users public function getRoleCategoryExclusion($role): array { $ret = []; - $categories = UserExcludedCategory::query()->where('role', $role)->get(['categories_id']); + $categories = RoleExcludedCategory::query()->where('role', $role)->get(['categories_id']); foreach ($categories as $category) { $ret[] = $category['categories_id']; }