We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6dbb836 + 7395b1a commit 16e93f9Copy full SHA for 16e93f9
app/Models/User.php
@@ -237,11 +237,14 @@ public function hasIndividualPermissions()
237
$permissions = json_decode($this->permissions, true);
238
}
239
240
- foreach ($permissions as $permission) {
241
- if ($permission != 0) {
242
- return true;
+ if (($permissions) && (is_array($permissions))) {
+ foreach ($permissions as $permission) {
+ if ($permission != 0) {
243
+ return true;
244
+ }
245
246
247
+
248
return false;
249
250
app/Observers/UserObserver.php
@@ -49,7 +49,8 @@ public function updating(User $user)
49
'end_date',
50
'autoassign_licenses',
51
'vip',
52
- 'password'
+ 'password',
53
+ 'permissions'
54
];
55
56
$changed = [];
0 commit comments