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

bnet/additions
Aleksander Machniak 5 years ago
parent 0aa724f73c
commit f0dc915fd8

@ -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