Skip to content

Commit

Permalink
User account creation logic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NuwanJ committed Nov 4, 2024
1 parent 246f5a5 commit c1369f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Domains/Auth/Services/UserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function destroy(User $user): bool
*/
protected function createUser(array $data = []): User
{
return $this->model::create([
return $this->model::updateOrCreate([
'type' => $data['type'] ?? $this->model::TYPE_USER,
'name' => $data['name'] ?? null,
'email' => $data['email'] ?? null,
Expand All @@ -330,4 +330,4 @@ protected function createUser(array $data = []): User
'active' => $data['active'] ?? true,
]);
}
}
}

0 comments on commit c1369f9

Please sign in to comment.