Skip to content

Commit

Permalink
Workaround weird user data merging issues beteen flat-file and databa…
Browse files Browse the repository at this point in the history
…se users

Closes #1083 (again!)
  • Loading branch information
duncanmcclean committed Aug 31, 2024
1 parent 3866ba7 commit 13a8d0a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Customers/UserCustomerRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,14 @@ public function save(Customer $customer): void
$ignoredKeys = array_merge($ignoredKeys, $user->model()->getAppends());
}

$user->data(array_merge(
$user->data()->all(),
Arr::except($customer->data()->all(), $ignoredKeys)
));
if ($this->isUsingEloquentUsers()) {

} else {
$user->data(array_merge(
$user->data()->all(),
Arr::except($customer->data()->all(), $ignoredKeys)
));
}

$user->save();

Expand Down

0 comments on commit 13a8d0a

Please sign in to comment.