Skip to content

Commit

Permalink
Use authIdentifier in relationships (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
inmanturbo authored Feb 1, 2023
1 parent 60e12e2 commit fb5a61b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ConnectedAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function getCredentials()
*/
public function user()
{
return $this->belongsTo(Jetstream::userModel(), 'user_id');
return $this->belongsTo(Jetstream::userModel(), 'user_id', (Jetstream::newUserModel())->getAuthIdentifierName());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/HasConnectedAccounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ public function getConnectedAccountFor(string $provider, string $id)
*/
public function connectedAccounts()
{
return $this->hasMany(Socialstream::connectedAccountModel(), 'user_id');
return $this->hasMany(Socialstream::connectedAccountModel(), 'user_id', $this->getAuthIdentifierName());
}
}

0 comments on commit fb5a61b

Please sign in to comment.