Skip to content

Commit

Permalink
fix: prevent auto assigning groups to admin users
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Oct 11, 2022
1 parent 9ca1901 commit ea078f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Jobs/AutoAssignUserGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public function handle(SettingsRepositoryInterface $settings, Dispatcher $dispat
{
$entries = json_decode($settings->get('fof-gamification.autoAssignedGroups'), true);

if (!is_array($entries)) {
// If there are no entries, or if the subject user is an admin, we can skip this job
if (!is_array($entries) || $this->user->isAdmin()) {
return;
}

Expand Down

0 comments on commit ea078f2

Please sign in to comment.