mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
Update HostingSubscription.php
This commit is contained in:
parent
b80f6d04ca
commit
f77ccb6929
1 changed files with 12 additions and 1 deletions
|
@ -53,7 +53,7 @@ class HostingSubscription extends Model
|
|||
$model->system_username = $create['system_username'];
|
||||
$model->system_password = $create['system_password'];
|
||||
} else {
|
||||
return false;
|
||||
throw new \Exception('System username or password not created');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -167,6 +167,17 @@ class HostingSubscription extends Model
|
|||
|
||||
if (strpos($createLinuxWebUserOutput, 'Creating home directory') !== false) {
|
||||
|
||||
// Check user is created
|
||||
$getLinuxUser = new GetLinuxUser();
|
||||
$getLinuxUser->setUsername($systemUsername);
|
||||
$linuxUser = $getLinuxUser->handle();
|
||||
if (empty($linuxUser)) {
|
||||
return [
|
||||
'error' => true,
|
||||
'message' => 'System username not created.'
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'system_username' => $systemUsername,
|
||||
'system_password' => $systemPassword
|
||||
|
|
Loading…
Reference in a new issue