fix(ui): Change active user name on top left with primary identity

This commit is contained in:
smizrahi
2022-11-23 13:33:59 +01:00
parent d3634747d5
commit 26b9429396

View File

@@ -497,7 +497,7 @@
return [[sd authenticationType] isEqualToString: @"cas"];
}
- (BOOL) usesSAML2Authentication
- (BOOL) usesSAML2Authenticationx
{
SOGoSystemDefaults *sd;
@@ -511,7 +511,11 @@
NSString *v;
/* The "identification" term is used in the human sense here. */
v = [[context activeUser] cn];
if ([[context activeUser] primaryIdentity] && [[[context activeUser] primaryIdentity] objectForKey:@"fullName"]) {
v = [[[context activeUser] primaryIdentity] objectForKey:@"fullName"];
} else {
v = [[context activeUser] cn];
}
return (v ? v : @"");
}