Skip to content

Commit

Permalink
Merge pull request wso2#4611 from Achintha444/master
Browse files Browse the repository at this point in the history
(fix) admin username not getting displaying properly in myaccount.
  • Loading branch information
Achintha Isuru authored Nov 15, 2023
2 parents 1489dd8 + ce60d2e commit 33879d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/warm-dingos-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/myaccount": patch
---

(fix) admin username not getting displaying properly in myaccount.
9 changes: 8 additions & 1 deletion apps/myaccount/src/components/shared/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,14 @@ export const Header: FunctionComponent<HeaderPropsInterface> = (
}

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 "";
Expand Down

0 comments on commit 33879d7

Please sign in to comment.