From 72fe94edb3c07224b3e7352fbf6fd7a4ff35eabd Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 17 Oct 2023 22:33:56 +0100 Subject: [PATCH] Fixed RB-17334 - ErrorException: Undefined variable $user_formatted_array Signed-off-by: snipe --- app/Importer/Importer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Importer/Importer.php b/app/Importer/Importer.php index 588a02d67..76703ae1f 100644 --- a/app/Importer/Importer.php +++ b/app/Importer/Importer.php @@ -281,9 +281,11 @@ abstract class Importer $user_array['email'] = User::generateEmailFromFullName($user_array['full_name']); } + // Get some variables for $user_formatted_array in case we need them later + $user_formatted_array = User::generateFormattedNameFromFullName($user_array['full_name'], Setting::getSettings()->username_format); + if (empty($user_array['first_name'])) { // Get some fields for first name and last name based off of full name - $user_formatted_array = User::generateFormattedNameFromFullName($user_array['full_name'], Setting::getSettings()->username_format); $user_array['first_name'] = $user_formatted_array['first_name']; $user_array['last_name'] = $user_formatted_array['last_name']; }