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:
parent
3fa5f5491d
commit
81567f370c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue