$this->accountId]); if ($account === null) { return; } /** @var \common\models\AccountSession $authSession */ foreach ($account->getSessions()->each(100, Yii::$app->unbufferedDb) as $authSession) { $authSession->delete(); } /** @var \common\models\OauthSession $oauthSession */ foreach ($account->getOauthSessions()->each(100, Yii::$app->unbufferedDb) as $oauthSession) { $oauthSession->delete(); } } }