Skip to content

Commit e0b8bc3

Browse files
committed
2 plesk activation improvements
1 parent b350a98 commit e0b8bc3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Plugin.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function_requirements('get_webhosting_plesk_instance');
147147
$cantFix = false;
148148
$passwordUpdated = false;
149149
while ($cantFix == false && !isset($result['id'])) {
150-
if (mb_strpos($error, 'The password should') !== false) {
150+
if (mb_strpos($error, 'The password should') !== false || mb_strpos($error, 'password is not complex') !== false) {
151151
// Error #2204 System user setting was failed. Error: The password should be 4 - 255 characters long and should not contain the username. Do not use quotes, spaces, and national alphabetic characters in the password.
152152
$passwordUpdated = true;
153153
$password = Plesk::randomString(16);
@@ -190,6 +190,10 @@ function_requirements('get_webhosting_plesk_instance');
190190
$accountId = $extra[0];
191191
} else {
192192
$event['success'] = false;
193+
getcurlpage('https://chat.is.cc/hooks/BAckHdSAoMsPieCof/CHQ3bKKo5Kh2HeHFJWDpxqBFyj2i7WZwmsLpLM7PmHK5D2fR', json_encode([
194+
'username' => 'Interesting Guy',
195+
'text' => 'Failed [Website '.$serviceClass->getId().'](https://my.interserver.net/admin/view_website?id='.$serviceClass->getId().') Activation Text:'.$error,
196+
]), [CURLOPT_HTTPHEADER => ['Content-type: application/json']]);
193197
$event->stopPropagation();
194198
return;
195199
}

0 commit comments

Comments
 (0)