From: Alexander Ebert Date: Tue, 17 Dec 2019 10:45:37 +0000 (+0100) Subject: Degrade owner groups during the import X-Git-Tag: 5.2.0_RC_2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9a97feef1f99acac706b699bd9c2f22f1541b659;p=GitHub%2FWoltLab%2FWCF.git Degrade owner groups during the import --- diff --git a/wcfsetup/install/files/lib/system/importer/UserGroupImporter.class.php b/wcfsetup/install/files/lib/system/importer/UserGroupImporter.class.php index 8532dde7bf..c6a79eb231 100644 --- a/wcfsetup/install/files/lib/system/importer/UserGroupImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/UserGroupImporter.class.php @@ -26,6 +26,11 @@ class UserGroupImporter extends AbstractImporter { $newGroupID = UserGroup::getGroupByType($data['groupType'])->groupID; } else { + // Imported owner groups must be degraded, there can be only one owner group. + if ($data['groupType'] == UserGroup::OWNER) { + $data['groupType'] = UserGroup::OTHER; + } + $action = new UserGroupAction([], 'create', [ 'data' => $data ]);