Skip to content

Commit 1a23294

Browse files
committed
updates setting password when one is blank on plesk web creation
1 parent 1d72b41 commit 1a23294

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Plugin.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ public static function getActivate(GenericEvent $event)
6262
$hostname = $serviceClass->getId().'.server.com';
6363
}
6464
$password = website_get_password($serviceClass->getId());
65+
if ($password == false) {
66+
$password = generateRandomString(10, 2, 2, 2, 1);
67+
$GLOBALS['tf']->history->add($settings['PREFIX'], 'password', $serviceClass->getId(), $password);
68+
}
69+
6570
$username = get_new_webhosting_username($serviceClass->getId(), $hostname, $serviceClass->getServer());
6671
$data = $GLOBALS['tf']->accounts->read($serviceClass->getCustid());
6772
$debugCalls = false;

0 commit comments

Comments
 (0)