From 4ff90d62cd907b70c4b0be6e9dff6326595032d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 25 Aug 2021 13:32:55 +0200 Subject: [PATCH] Simplify UserFormField's form data processor using `\array_column()` --- .../system/form/builder/field/user/UserFormField.class.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/system/form/builder/field/user/UserFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/user/UserFormField.class.php index 6a6be22c9f..ee08fe3acd 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/user/UserFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/user/UserFormField.class.php @@ -95,11 +95,7 @@ class UserFormField extends AbstractFormField implements 'multipleUsers', function (IFormDocument $document, array $parameters) { if ($this->checkDependencies()) { - $parameters[$this->getObjectProperty()] = \array_values( - \array_map(static function (UserProfile $user) { - return $user->userID; - }, $this->getUsers()) - ); + $parameters[$this->getObjectProperty()] = \array_column($this->getUsers(), 'userID'); } return $parameters; -- 2.20.1