[API] Fix User variable from array to object

Fix $user variable from array to object to make API work again.
This commit is contained in:
stefan committed 2023-04-23 22:07:24 +02:00
1 parent 68d83b9a7a
commit 1bd9def63e
18 files changed
+69 -69

No files matched your search

@@ -18,7 +18,7 @@ class UserPreferenceController extends AppController {
parent::beforeFilter();
global $user;
# We already tested for auth in appController, so we just need to test for specific permission
$canView = (!$user) || ($user['Users'] != 'None');
$canView = (!$user) || ($user->Users() != 'None');
if (!$canView) {
throw new UnauthorizedException(__('Insufficient Privileges'));
return;