From f4d0ce5a696b5edab831d0f4be504ced67309de1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 2 Dec 2011 20:27:38 +0100 Subject: [PATCH] Users can now be added through ACP again Fixes #273 --- .../lib/system/option/user/UserOptionHandler.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php b/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php index ee50ce3690..5718f999ae 100644 --- a/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php +++ b/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php @@ -72,7 +72,9 @@ class UserOptionHandler extends OptionHandler { $optionData = parent::getOption($optionName); $optionData['object'] = new ViewableUserOption($optionData['object']); - $optionData['object']->setOptionValue($this->user); + if ($this->user !== null) { + $optionData['object']->setOptionValue($this->user); + } if ($this->removeEmptyOptions && empty($optionData['object']->optionValue)) { return null; @@ -107,7 +109,9 @@ class UserOptionHandler extends OptionHandler { * @see wcf\system\option\OptionHandler::checkVisibility() */ protected function checkVisibility(Option $option) { - $option->setUser($this->user); + if ($this->user !== null) { + $option->setUser($this->user); + } return $option->isVisible(); } -- 2.20.1