MDL-65782 roles: allow several roles with user/frontpage archetype

This commit is contained in:
Marina Glancy 2019-05-29 11:53:13 +02:00
parent 29c395187f
commit 5ecbc5d9f7
5 changed files with 8 additions and 13 deletions

View file

@ -58,7 +58,7 @@ if (!during_initial_install()) { //do not use during installation
foreach ($roles as $role) {
if (empty($role->archetype) or $role->archetype === 'guest' or $role->archetype === 'frontpage' or $role->archetype === 'student') {
$options[$role->id] = $role->localname;
if ($role->archetype === 'frontpage') {
if ($role->archetype === 'frontpage' && !$defaultfrontpageroleid) {
$defaultfrontpageroleid = $role->id;
}
}