When changing name (first name or last name), the new alias was tested against
existing aliases in email_source_account table but not against those in
email_source_other, where the homonyms are.
Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
FROM email_source_account
WHERE email = {?} AND type != \'alias_aux\'',
$this->new_alias);
+ if (!$used) {
+ // Check against homonyms
+ $used = XDB::fetchOneCell('SELECT COUNT(email)
+ FROM email_source_other
+ WHERE email = {?}',
+ $this->new_alias);
+ }
if ($used) {
$this->new_alias = null;
}