From 038e61bf3751738bb7bbd096d439ae753d2bf8a5 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 11 Jul 2019 10:28:09 -0400 Subject: [PATCH] Make Anilist missing username error more reliable, allow editing anilist username in settings panel --- src/API/Anilist/Model.php | 2 +- src/constants.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/API/Anilist/Model.php b/src/API/Anilist/Model.php index a5fa3011..6e1d4845 100644 --- a/src/API/Anilist/Model.php +++ b/src/API/Anilist/Model.php @@ -100,7 +100,7 @@ final class Model $config = $this->container->get('config'); $anilistUser = $config->get(['anilist', 'username']); - if ( ! \is_string($anilistUser)) + if ( ! (is_string($anilistUser) && $anilistUser !== '')) { throw new InvalidArgumentException('Anilist username is not defined in config'); } diff --git a/src/constants.php b/src/constants.php index 742f18d3..ad6c0e89 100644 --- a/src/constants.php +++ b/src/constants.php @@ -61,7 +61,6 @@ const SETTINGS_MAP = [ 'type' => 'string', 'title' => 'Anilist Username', 'default' => '', - 'readonly' => TRUE, 'description' => 'Login username for Anilist account to integrate with', ], 'access_token' => [