mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-25 07:48:26 -04:00
[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:
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;
|
||||
|
||||
Reference in new issue
Block a user