andWhere(['user_id' => $userId]); } /** * Filter by provider. */ public function byProvider(string $provider): self { return $this->andWhere(['provider' => $provider]); } /** * Filter by provider ID. */ public function byProviderId(string $providerId): self { return $this->andWhere(['provider_id' => $providerId]); } /** * Filter connected accounts only. */ public function connected(): self { return $this->andWhere(['not', ['user_id' => null]]); } /** * Filter unconnected accounts only. */ public function unconnected(): self { return $this->andWhere(['user_id' => null]); } }