Skip to content

Commit

Permalink
Fixed RB-17334 - ErrorException: Undefined variable $user_formatted_a…
Browse files Browse the repository at this point in the history
…rray

Signed-off-by: snipe <[email protected]>
  • Loading branch information
snipe committed Oct 17, 2023
1 parent 3e54a9d commit 72fe94e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Importer/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,11 @@ protected function createOrFetchUser($row, $type = 'user')
$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'];
}
Expand Down

0 comments on commit 72fe94e

Please sign in to comment.