diff --git a/lib/Froxlor/Api/Commands/EmailAccounts.php b/lib/Froxlor/Api/Commands/EmailAccounts.php index f341c880..feb0cd9a 100644 --- a/lib/Froxlor/Api/Commands/EmailAccounts.php +++ b/lib/Froxlor/Api/Commands/EmailAccounts.php @@ -99,6 +99,11 @@ class EmailAccounts extends ApiCommand implements ResourceEntity Response::standardError('notallowedtouseaccounts', '', true); } + if (!empty($emailaddr)) { + $idna_convert = new IdnaWrapper(); + $emailaddr = $idna_convert->encode($emailaddr); + } + // get email address $result = $this->apiCall('Emails.get', [ 'id' => $id, @@ -357,6 +362,11 @@ class EmailAccounts extends ApiCommand implements ResourceEntity $ea_optional = $id > 0; $emailaddr = $this->getParam('emailaddr', $ea_optional, ''); + if (!empty($emailaddr)) { + $idna_convert = new IdnaWrapper(); + $emailaddr = $idna_convert->encode($emailaddr); + } + // validation $result = $this->apiCall('Emails.get', [ 'id' => $id, diff --git a/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php b/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php index 02cd8f5f..f18d69b7 100644 --- a/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php +++ b/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php @@ -43,13 +43,16 @@ return [ 'email_password' => [ 'label' => lng('login.password'), 'type' => 'password', - 'autocomplete' => 'off' - ], - 'email_password_suggestion' => [ - 'label' => lng('customer.generated_pwd'), - 'type' => 'text', - 'visible' => (Settings::Get('panel.password_regex') == ''), - 'value' => Crypt::generatePassword() + 'autocomplete' => 'off', + 'next_to' => [ + 'email_password_suggestion' => [ + 'next_to_prefix' => lng('customer.generated_pwd') . ':', + 'type' => 'text', + 'visible' => (Settings::Get('panel.password_regex') == ''), + 'value' => Crypt::generatePassword(), + 'readonly' => true + ] + ] ] ] ] diff --git a/lib/formfields/customer/email/formfield.emails_addaccount.php b/lib/formfields/customer/email/formfield.emails_addaccount.php index 01c871dd..ea0be6d6 100644 --- a/lib/formfields/customer/email/formfield.emails_addaccount.php +++ b/lib/formfields/customer/email/formfield.emails_addaccount.php @@ -46,7 +46,7 @@ return [ 'autocomplete' => 'off', 'mandatory' => true, 'next_to' => [ - 'admin_password_suggestion' => [ + 'email_password_suggestion' => [ 'next_to_prefix' => lng('customer.generated_pwd') . ':', 'type' => 'text', 'visible' => (Settings::Get('panel.password_regex') == ''),