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 3badf13c22
commit 0fc3791f37
3 changed files with 18 additions and 8 deletions
+3 -4
View File
@@ -1670,10 +1670,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;
[userDefaults setMailCustomEmail: value];