|
|
@@ -113,11 +113,12 @@ class TemplateInstallProvider extends BaseDataProvider implements ClientArea, Ad
|
|
|
$this->configuration()->isAgentServicePassword() &&
|
|
|
!$this->configuration()->isAgentTemplateUser() &&
|
|
|
preg_match('/w/', $vm ->config()['ostype'])){
|
|
|
- $ciuser = $vm->config()['ciuser'];
|
|
|
+ $ciuser = $this->formData['username'] ? $this->formData['username'] : $vm->config()['ciuser'];
|
|
|
$this->hosting()->update(['username' => $ciuser ?: 'Administrator' ]);
|
|
|
}
|
|
|
elseif($this->configuration()->isQemu() && $this->configuration()->getCiuser()){
|
|
|
- $this->hosting()->update(['username' => $this->formData['username'] ? $this->formData['username'] : $this->configuration()->getCiuser() ]);
|
|
|
+ $ciuser = $this->formData['username'] ? $this->formData['username'] : $vm->config()['ciuser'];
|
|
|
+ $this->hosting()->update(['username' => $ciuser ?: 'root' ]]);
|
|
|
}
|
|
|
$arguments = [
|
|
|
'hostingId' => $this->getWhmcsParamByKey('serviceid'),
|