fix(core): avoid exception when the user's cn is null

This commit is contained in:
Francis Lachapelle
2021-12-09 10:03:59 -05:00
parent e3ef4e2c78
commit 153c1eeb80
+5 -1
View File
@@ -284,7 +284,11 @@
- (void) _fetchCN
{
cn = [[self _fetchFieldForUser: @"cn"] stringByTrimmingSpaces];
cn = [self _fetchFieldForUser: @"cn"];
if ([cn isNotNull])
cn = [cn stringByTrimmingSpaces];
else
cn = [NSString stringWithString: login];
[cn retain];
}