diff --git a/src/Immoscout/ApiRequest.php b/src/Immoscout/ApiRequest.php index 96d2d36..243a675 100644 --- a/src/Immoscout/ApiRequest.php +++ b/src/Immoscout/ApiRequest.php @@ -28,6 +28,9 @@ public function __construct(?array $auth = null, ?string $user = null) { $this->client = $this->getPreparedClient($auth); $this->user = $user ?? $_ENV['IMSC_USERNAME'] ?? 'me'; + if (trim($this->user) === '') { + $this->user = 'me'; + } } /**