> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# local const

> chat_user::local

Returns a `const` pointer to the [chat\_user\_local](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_user/chat_user_local/chat_user_local.md) object associated with this user, if the user is local.

## Syntax

```cpp theme={null}
const chat_user_local* local const(  
)  
```

### Parameters

None.

### Return value

Type: const [chat\_user\_local](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_user/chat_user_local/chat_user_local.md)\*

Returns a `const` pointer to the [chat\_user\_local](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_user/chat_user_local/chat_user_local.md) object associated to this user, if the user is local; otherwise, `NULL`.

## Remarks

This method returns a `const` pointer to the [chat\_user\_local](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_user/chat_user_local/chat_user_local.md) object associated with this [chat\_user](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_user/chat_user.md) object, if the user is local. The returned `const` pointer remains valid for the life of the associated `chat_user` object, which is until the user has been removed by a call to the [chat\_manager::remove\_user](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_remove_user.md) method. For more information about adding local and remote users to the local [chat\_manager](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_manager/chat_manager.md) instance for your app, see the [Adding users to Game Chat 2](https://docs.xbox.com/services/xbox-services/multiplayer/chat/game-chat2/using-game-chat-2.md#adding_users_to_game_chat_2) section in [Using the Game Chat 2 C++ API](https://docs.xbox.com/services/xbox-services/multiplayer/chat/game-chat2/using-game-chat-2.md).

## Requirements

**Header:** GameChat2.h

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[Intro to Game Chat 2](https://docs.xbox.com/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro.md)\
[chat\_user::local](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_user/methods/chat_user_local_function-overloads.md)\
[chat\_user](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_user/chat_user.md)


## Related topics

- [local function - overloads](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_user/methods/chat_user_local_function-overloads.md)
- [local](https://docs.xbox.com/reference/chat/gamechat2/classes/chat_user/methods/chat_user_local_function.md)
- [PartyLocalUserRemovedReason](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partylocaluserremovedreason.md)
- [PartyLocalChatControlChatIndicator](https://docs.xbox.com/services/playfab/multiplayer/networking/reference/enums/partylocalchatcontrolchatindicator.md)
- [PartyXblLocalChatUserDestroyedReason](https://docs.xbox.com/services/playfab/multiplayer/networking/xblreference/enums/partyxbllocalchatuserdestroyedreason.md)
