Enigma: Simplify and fix handling of IDN with not all parts being punny-coded

pull/7186/head
Aleksander Machniak 5 years ago
parent e89376709c
commit 689c761026

@ -436,12 +436,9 @@ class enigma_ui
$table->add_header('valid', $this->enigma->gettext('uservalid'));
foreach ($this->data->users as $user) {
// Convert punny-code domain into UTF8
if (($pos = strpos($user->email, '@xn--')) > 0) {
$domain = substr($user->email, $pos + 1);
if ($domain = rcube_utils::idn_to_utf8($domain)) {
$user->email = substr($user->email, 0, $pos + 1) . $domain;
}
// Display domains in UTF8
if ($email = rcube_utils::idn_to_utf8($user->email)) {
$user->email = $email;
}
$username = $user->name;

Loading…
Cancel
Save