Skip to content

Commit

Permalink
fix(core): avoid exception when the user's cn is null
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Dec 9, 2021
1 parent e3ef4e2 commit 153c1ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion SoObjects/SOGo/SOGoUser.m
Expand Up @@ -284,7 +284,11 @@ - (void) _fetchAllEmails

- (void) _fetchCN
{
cn = [[self _fetchFieldForUser: @"cn"] stringByTrimmingSpaces];
cn = [self _fetchFieldForUser: @"cn"];
if ([cn isNotNull])
cn = [cn stringByTrimmingSpaces];
else
cn = [NSString stringWithString: login];
[cn retain];
}

Expand Down

0 comments on commit 153c1ee

Please sign in to comment.