Skip to content

Commit 16e93f9

Browse files
committed
Merge remote-tracking branch 'origin/master' into develop
2 parents 6dbb836 + 7395b1a commit 16e93f9

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

app/Models/User.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,14 @@ public function hasIndividualPermissions()
237237
$permissions = json_decode($this->permissions, true);
238238
}
239239

240-
foreach ($permissions as $permission) {
241-
if ($permission != 0) {
242-
return true;
240+
if (($permissions) && (is_array($permissions))) {
241+
foreach ($permissions as $permission) {
242+
if ($permission != 0) {
243+
return true;
244+
}
243245
}
244246
}
247+
245248
return false;
246249
}
247250

app/Observers/UserObserver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public function updating(User $user)
4949
'end_date',
5050
'autoassign_licenses',
5151
'vip',
52-
'password'
52+
'password',
53+
'permissions'
5354
];
5455

5556
$changed = [];

0 commit comments

Comments
 (0)