From 0f0b8950efab740f2f7afe221e8e172de84dc267 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Wed, 15 Nov 2023 12:17:30 +0530 Subject: [PATCH 1/2] (fix) admin username not getting displaying properly in myaccount. --- apps/myaccount/src/components/shared/header.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/myaccount/src/components/shared/header.tsx b/apps/myaccount/src/components/shared/header.tsx index 46684b93e2b..9e3d9251dbc 100644 --- a/apps/myaccount/src/components/shared/header.tsx +++ b/apps/myaccount/src/components/shared/header.tsx @@ -267,7 +267,14 @@ export const Header: FunctionComponent = ( } if (profileInfo?.userName) { - return profileInfo.userName.split("/")[ 1 ]; + const userName: string = profileInfo.userName.split("/")[ 1 ]; + + // If the username is in TENANT/USERNAME format, return the USERNAME. + if (userName) { + return userName; + } + + return profileInfo.userName; } return ""; From ce60d2efb105b5558e802363fb123a02e80d2698 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Wed, 15 Nov 2023 12:17:50 +0530 Subject: [PATCH 2/2] =?UTF-8?q?Add=20changeset=20=F0=9F=A6=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/warm-dingos-battle.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/warm-dingos-battle.md diff --git a/.changeset/warm-dingos-battle.md b/.changeset/warm-dingos-battle.md new file mode 100644 index 00000000000..e90d74d4f72 --- /dev/null +++ b/.changeset/warm-dingos-battle.md @@ -0,0 +1,5 @@ +--- +"@wso2is/myaccount": patch +--- + +(fix) admin username not getting displaying properly in myaccount.