mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Implementation of the backend for the OAuth2 clients management
This commit is contained in:
@@ -34,6 +34,7 @@ use const common\LATEST_RULES_VERSION;
|
||||
* Отношения:
|
||||
* @property EmailActivation[] $emailActivations
|
||||
* @property OauthSession[] $oauthSessions
|
||||
* @property OauthClient[] $oauthClients
|
||||
* @property UsernameHistory[] $usernameHistory
|
||||
* @property AccountSession[] $sessions
|
||||
* @property MinecraftAccessKey[] $minecraftAccessKeys
|
||||
@@ -93,6 +94,11 @@ class Account extends ActiveRecord {
|
||||
return $this->hasMany(OauthSession::class, ['owner_id' => 'id'])->andWhere(['owner_type' => 'user']);
|
||||
}
|
||||
|
||||
public function getOauthClients(): OauthClientQuery {
|
||||
/** @noinspection PhpIncompatibleReturnTypeInspection */
|
||||
return $this->hasMany(OauthClient::class, ['account_id' => 'id']);
|
||||
}
|
||||
|
||||
public function getUsernameHistory(): ActiveQuery {
|
||||
return $this->hasMany(UsernameHistory::class, ['account_id' => 'id']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user