protected function deleteExtraRecords()
    {
        try {
            $limit = (int)($this->limitMax);
        } catch (\Exception $ex) {
            Yii::error($ex->getMessage(), __METHOD__);
            return 0;
        }
        $host = $this->host;
         /* @var $host \rhosocial\user\User */
        $count = static::find()->createdBy($host)->count();
        Yii::info($host->getReadableGUID() . " has $count login logs.", __METHOD__);
        if ($count > $limit) {
            foreach (static::find()->createdBy($host)->orderByCreatedAt()->limit($count - $limit)->all() as $login) {
                /* @var $login static */
                $result = $login->delete();
                if (YII_ENV_DEV) {
                    Yii::info($host->getReadableGUID() . ": ($result) login record created at (" . $login->getCreatedAt() . ") was just deleted.", __METHOD__);
                }
            }
        }
        return $count - $limit;
    }