From 9a97feef1f99acac706b699bd9c2f22f1541b659 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 17 Dec 2019 11:45:37 +0100 Subject: [PATCH] Degrade owner groups during the import --- .../files/lib/system/importer/UserGroupImporter.class.php | 5 +++++ 1 file changed, 5 insertions(+) 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 ]); -- 2.20.1