> For the complete documentation index, see [llms.txt](https://docs.tankandhealerstudio.com/assets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tankandhealerstudio.com/assets/ultimatechatbox/documentation/ultimatechatbox/public-methods/findchatsfromuser.md).

# FindChatsFromUser

Returns all the chats that have been registered with the targeted username.

{% code overflow="wrap" lineNumbers="true" fullWidth="true" %}

```csharp
using UnityEngine;
using TankAndHealerStudioAssets;

public class ChatBoxExample : MonoBehaviour
{
	// BE SURE TO ASSIGN THESE IN THE INSPECTOR //
	public UltimateChatBox chatBox;
	
	void Start ()
	{
		// Subscribe to the OnUsernameInteract callback with the following functionality...
		chatBox.OnUsernameInteract += ( chatInfo ) =>
		{
			// Store an array of all chats that are registered from the interacted username.
			UltimateChatBox.ChatInformation[] chatsFromUser = chatBox.FindChatsFromUser( chatInfo.InternalUsername ).ToArray();

			// Loop through each chat in the array and remove the chats from the chat box.
			for( int i = 0; i < chatsFromUser.Length; i++ )
				chatsFromUser[ i ].RemoveChat();
		};
	}
}
```

{% endcode %}
