From: Raphaël Barrois Date: Sat, 9 Oct 2010 23:24:39 +0000 (+0200) Subject: Fix ids_from_emails (errors when invalid @x.org emails were given). X-Git-Tag: xorg/1.0.1~15^2~3 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=0c109685615e7543921e02c98f82328c2837a6c6;p=platal.git Fix ids_from_emails (errors when invalid @x.org emails were given). Signed-off-by: Raphaël Barrois --- diff --git a/include/emails.inc.php b/include/emails.inc.php index 4fdbacf..9b1f5a4 100644 --- a/include/emails.inc.php +++ b/include/emails.inc.php @@ -123,7 +123,10 @@ function ids_from_mails(array $emails) } // Connect emails with uids foreach ($domain_mails as $email => $user) { - $uids[$email] = $domain_uids[$user]; + // Some 'domain' emails might be invalid. + if (array_key_exists($user, $domain_uids)) { + $uids[$email] = $domain_uids[$user]; + } } // Look up user ids for addresses in our alias domain @@ -142,7 +145,9 @@ function ids_from_mails(array $emails) } // Connect emails with uids foreach ($alias_mails as $email => $user) { - $uids[$email] = $alias_uids[$user]; + if (array_key_exists($user, $alias_uids)) { + $uids[$email] = $alias_uids[$user]; + } } // Look up user ids for other addresses in the email redirection list