From 8c78c4240ee88ade7e84abd25a357b4ffefb549d Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 24 Feb 2019 16:27:31 +0100 Subject: [PATCH] Prevent changing the field type of profile fields Closes #2853 --- wcfsetup/install/files/acp/templates/userOptionAdd.tpl | 2 +- .../install/files/lib/acp/form/UserOptionEditForm.class.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/userOptionAdd.tpl b/wcfsetup/install/files/acp/templates/userOptionAdd.tpl index d86ee27034..df8f6fcc1a 100644 --- a/wcfsetup/install/files/acp/templates/userOptionAdd.tpl +++ b/wcfsetup/install/files/acp/templates/userOptionAdd.tpl @@ -100,7 +100,7 @@
- {foreach from=$availableOptionTypes item=availableOptionType} {/foreach} diff --git a/wcfsetup/install/files/lib/acp/form/UserOptionEditForm.class.php b/wcfsetup/install/files/lib/acp/form/UserOptionEditForm.class.php index 2ed4699092..1c05d541b9 100644 --- a/wcfsetup/install/files/lib/acp/form/UserOptionEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserOptionEditForm.class.php @@ -56,9 +56,7 @@ class UserOptionEditForm extends UserOptionAddForm { public function readFormParameters() { parent::readFormParameters(); - if ($this->userOption->optionName === 'aboutMe') { - $this->optionType = 'aboutMe'; - } + $this->optionType = $this->userOption->optionType; } /** -- 2.20.1