diff --git a/src/Jobs/AutoAssignUserGroups.php b/src/Jobs/AutoAssignUserGroups.php index 86bb8e6..5897671 100644 --- a/src/Jobs/AutoAssignUserGroups.php +++ b/src/Jobs/AutoAssignUserGroups.php @@ -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; }