From 26b9429396df8ade2978111d9b66bcdcf5528beb Mon Sep 17 00:00:00 2001 From: smizrahi Date: Wed, 23 Nov 2022 13:33:59 +0100 Subject: [PATCH] fix(ui): Change active user name on top left with primary identity --- UI/Common/UIxPageFrame.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/UI/Common/UIxPageFrame.m b/UI/Common/UIxPageFrame.m index e4dc5d9bb..b8830f149 100644 --- a/UI/Common/UIxPageFrame.m +++ b/UI/Common/UIxPageFrame.m @@ -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 : @""); }