---
title: Customizing the format of usernames
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

If you want to customize how the system displays usernames in the administration interface, modify the **GetFormattedUsername** method in **\~/AppCode/CMS/Functions.cs**.

## Example

Usernames are displayed in the&#x20;_&#x20;()_ (e.g. _Abigail Woodwarth (Abi)_) format in some parts of the system, for example when editing documents in the Pages application on the **Properties -> General** tab.

The following code example shows how to modify the method to get usernames in format&#x20;_&#x20;\[]_ (e.g. _Abi \[Abigail Woodwarth]_):

```csharp

using CMS.Membership;
using CMS.Helpers;

...

public static string GetFormattedUserName(string username, string fullname, bool isLiveSite)
{
    username = UserInfoProvider.TrimSitePrefix(username);

    if (!String.IsNullOrEmpty(DataHelper.GetNotEmpty(fullname, "").Trim()))
    {
        return String.Format("{1} [{0}]", fullname, username);
    }
    else
    {
        return username;
    }
}

```
