From 909911fdfd12d120531f1966b6a20fedec73ccf8 Mon Sep 17 00:00:00 2001 From: Igor Biki <ibiki@uwaterloo.ca> Date: Tue, 6 Dec 2022 09:49:49 -0500 Subject: [PATCH] ISTWCMS-5983: Removing extra array wrapping when loading existing user. --- src/Form/UwAddUsersForm.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Form/UwAddUsersForm.php b/src/Form/UwAddUsersForm.php index cce2b9d2..5cb5db55 100644 --- a/src/Form/UwAddUsersForm.php +++ b/src/Form/UwAddUsersForm.php @@ -86,7 +86,6 @@ class UwAddUsersForm extends FormBase { /** * {@inheritdoc} - * @throws \Exception */ public function submitForm(array &$form, FormStateInterface $form_state) { @@ -123,7 +122,7 @@ class UwAddUsersForm extends FormBase { } $existing_user = $this->entityTypeManager->getStorage('user')->loadByProperties([ - ['name' => $user], + 'name' => $user, ]); /** @var \Drupal\user\UserInterface|bool $existing_user */ -- GitLab