Skip to content

Commit

Permalink
Merge pull request #15 from ristekusdi/hotfix
Browse files Browse the repository at this point in the history
fix change auth identifier id in user model
  • Loading branch information
kresnasatya authored Jan 19, 2023
2 parents 46b3c6f + 852bdb7 commit c1eda60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function __get(string $name)
*/
public function getKey()
{
return $this->preferred_username;
return isset($this->unud_sso_id) ? $this->unud_sso_id : $this->sub;
}

/**
Expand All @@ -65,7 +65,7 @@ public function getKey()
*/
public function getAuthIdentifierName()
{
return 'preferred_username';
return 'id';
}

/**
Expand All @@ -75,7 +75,7 @@ public function getAuthIdentifierName()
*/
public function getAuthIdentifier()
{
return $this->preferred_username;
return $this->id;
}

/**
Expand Down

0 comments on commit c1eda60

Please sign in to comment.