diff --git a/src/ConnectedAccount.php b/src/ConnectedAccount.php index c511e38f..599d37bf 100644 --- a/src/ConnectedAccount.php +++ b/src/ConnectedAccount.php @@ -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()); } /** diff --git a/src/HasConnectedAccounts.php b/src/HasConnectedAccounts.php index 3bf60a1f..15e3987f 100644 --- a/src/HasConnectedAccounts.php +++ b/src/HasConnectedAccounts.php @@ -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()); } }