mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Реализован функционал Mojang API
Исправлена ошибка доступа к authserver из-за перехода на использование хостов, а не доменов
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace common\models;
|
||||
|
||||
use Yii;
|
||||
use yii\behaviors\TimestampBehavior;
|
||||
use yii\db\ActiveRecord;
|
||||
|
||||
@@ -42,4 +41,16 @@ class UsernameHistory extends ActiveRecord {
|
||||
return $this->hasOne(Account::class, ['id' => 'account_id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $afterTime
|
||||
* @return UsernameHistory|null
|
||||
*/
|
||||
public function findNext(int $afterTime = null) /*: ?UsernameHistory*/ {
|
||||
return self::find()
|
||||
->andWhere(['account_id' => $this->account_id])
|
||||
->andWhere(['>', 'applied_in', $afterTime ?: $this->applied_in])
|
||||
->orderBy(['applied_in' => SORT_ASC])
|
||||
->one();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user