Skip to content

Commit aa03129

Browse files
KoltesDigitaltrasher
authored andcommitted
Add the name of groups the member belongs to
1 parent de963b7 commit aa03129

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

lib/GaletteOAuth2/Authorization/UserHelper.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,14 @@ public static function getUserData(Container $container, int $id, string $acl, a
289289
*/
290290
protected static function getUserGroups(Adherent $member): array
291291
{
292-
$groups = [$member->sstatus]; //first group is the member status
292+
$groups = array_map(
293+
function ($group) {
294+
return $group->getName();
295+
},
296+
$member->getGroups()
297+
);
298+
299+
$groups[] = $member->sstatus;
293300

294301
if ($member->isAdmin()) {
295302
$groups[] = 'admin';

0 commit comments

Comments
 (0)