Allow custom email to be one of the user's profile

Fixes #3551
This commit is contained in:
Francis Lachapelle
2016-10-03 10:29:30 -04:00
parent f0a368e42c
commit b4676ce439
3 changed files with 19 additions and 7 deletions
+3 -4
View File
@@ -1860,10 +1860,9 @@ static NSArray *reminderValues = nil;
value = [[identity objectForKey: @"email"]
stringByTrimmingSpaces];
/* We make sure that the "custom" value is different from the values
returned by the user directory service. */
if ([value length] == 0
|| [[user allEmails] containsObject: value])
/* We make sure that the "custom" value is different from the system email */
if ([value length] == 0)
|| [[user systemEmail] isEqualToString: value])
value = nil;
if (value)