Skip to content

Commit

Permalink
Update src/Extension/SiteConfigExtension.php
Browse files Browse the repository at this point in the history
Co-authored-by: Guy Marriott <guy.the.person@gmail.com>
  • Loading branch information
scott-nz and ScopeyNZ authored Nov 4, 2020
1 parent 5671026 commit 5f08b93
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/Extension/SiteConfigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,12 @@ public function updateCMSFields(FieldList $fields)
));
$mfaGraceEnd->addExtraClass('mfa-settings__grace-period');

$groupsMap = (function () {
$map = [];
foreach (Group::get() as $group) {
// Listboxfield values are escaped, use ASCII char instead of &raquo;
$map[$group->ID] = $group->getBreadcrumbs(' > ');
}
asort($map);
return $map;
})();
$groupsMap = [];
foreach (Group::get() as $group) {
// Listboxfield values are escaped, use ASCII char instead of &raquo;
$groupsMap[$group->ID] = $group->getBreadcrumbs(' > ');
}
asort($groupsMap);

$mfaGroupRestrict = ListboxField::create(
"MFAGroupRestrictions",
Expand Down

0 comments on commit 5f08b93

Please sign in to comment.