diff --git a/api/modules/authserver/models/AuthenticationForm.php b/api/modules/authserver/models/AuthenticationForm.php index edbc6c7..5a0f65b 100644 --- a/api/modules/authserver/models/AuthenticationForm.php +++ b/api/modules/authserver/models/AuthenticationForm.php @@ -69,8 +69,8 @@ class AuthenticationForm extends Form { protected function createMinecraftAccessToken(Account $account) : MinecraftAccessKey { /** @var MinecraftAccessKey|null $accessTokenModel */ $accessTokenModel = MinecraftAccessKey::findOne([ - 'client_token' => $this->clientToken, 'account_id' => $account->id, + 'client_token' => $this->clientToken, ]); if ($accessTokenModel === null) { diff --git a/console/migrations/m161024_234121_remove_client_token_index.php b/console/migrations/m161024_234121_remove_client_token_index.php new file mode 100644 index 0000000..5561067 --- /dev/null +++ b/console/migrations/m161024_234121_remove_client_token_index.php @@ -0,0 +1,15 @@ +dropIndex('client_token', '{{%minecraft_access_keys}}'); + } + + public function safeDown() { + $this->createIndex('client_token', '{{%minecraft_access_keys}}', 'client_token', true); + } + +}