Skip to content

Commit

Permalink
change model methods calls
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Jul 27, 2023
1 parent 56d838a commit 6b6abea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Kinde.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public function callback()

$userModel = model(UserModel::class);

if ($userModel->findByKindeId($profile['kinde_id'])) {
$userModel->updateByKindeId($profile['kinde_id'], $profile);
if ($userModel->findByIdentity($profile['identity'])) {
$userModel->updateByIdentity($profile['identity'], $profile);
} else {
$userModel->insert($profile);
}
Expand All @@ -60,7 +60,7 @@ public function isAuthenticated(): bool
private function formatUserDetails(array $profile): array
{
return [
'kinde_id' => $profile['id'],
'identity' => $profile['id'],
'first_name' => $profile['given_name'],
'last_name' => $profile['family_name'],
'email' => $profile['email'],
Expand Down

0 comments on commit 6b6abea

Please sign in to comment.