Skip to content

Commit

Permalink
Wrap group in array if a single group is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
lost1227 committed Mar 11, 2024
1 parent 74a08ae commit 2a78bfd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions User/GenericOAuth2UserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ public function getExternalGroupIds()
return array();
}

if(!is_array($groups)) {
$groups = array($groups);
}

$groups = array_unique($groups);
$this->logger->debug('OAuth2: '.$this->getUsername().' groups are '. join(',', $groups));

Expand Down

0 comments on commit 2a78bfd

Please sign in to comment.