#9 show setup page as long as no password is configured

This commit is contained in:
Adrian Gebhart 2021-12-01 01:06:17 +01:00
parent 3f672595ea
commit e74b3801a8
No known key found for this signature in database
GPG key ID: 7F19F49F80E3A7BE
2 changed files with 7 additions and 4 deletions

View file

@ -22,9 +22,12 @@ class ConfigurationManager
return $this->GetConfig()['username']; return $this->GetConfig()['username'];
} }
public function GetPassword() : string { public function GetPassword() : ?string {
return $this->GetConfig()['password']; if(array_key_exists('password', $this->GetConfig())){
} return $this->GetConfig()['password'];
}
else return null;
}
public function GetToken() : string { public function GetToken() : string {
return $this->GetConfig()['AIO_TOKEN']; return $this->GetConfig()['AIO_TOKEN'];

View file

@ -27,6 +27,6 @@ class Setup
} }
public function CanBeInstalled() : bool { public function CanBeInstalled() : bool {
return !file_exists(DataConst::GetConfigFile()); return is_null($this->configurationManager->GetPassword());
} }
} }