Allow NULL as userId to prevent error when not logged in

Signed-off-by: Christopher Zentgraf <git@the-zenti.de>
This commit is contained in:
Christopher Zentgraf 2020-07-22 18:23:24 +02:00
parent 3fa5f5491d
commit 81567f370c
No known key found for this signature in database
GPG Key ID: DE37ACC21687CB63
1 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ use OCP\IConfig;
class SettingsService {
/**
* @var string
* @var ?string
*/
private $userId;
@ -46,7 +46,7 @@ class SettingsService {
* @param IConfig $settings
* @param string $appName
*/
public function __construct(string $userId, IConfig $config, string $appName) {
public function __construct(?string $userId, IConfig $config, string $appName) {
$this->userId = $userId;
$this->config = $config;
$this->appName = $appName;