> For the complete documentation index, see [llms.txt](https://docs.otherside.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherside.xyz/platform-documentation/creation/unreal-development/features-and-tutorials/helpers-and-extras/the-user-id-replication-component.md).

# Morpheus UserID

## UserID Replication Component

The `M2_UserIDReplicationComponent` is a Morpheus Actor Component added to all `M2M_CharacterBase` classes (which is the parent of `BPM_ODK_PlayerCharacterBase`) . It is used to inform the server of the character's web platform UserId, since this information comes from the local client.

On the server, you can call `HandleUserIdReplicatedToServer` to trigger a callback with the UserId once it has been obtained. (If this is called after the UserId has already been obtained, the callback will trigger immediately).

Once you are certain that the UserId has been obtained, you can subsequently use `GetUserIdAsString`.

<figure><img src="https://970394512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft3SBfOIsRz4GCNFFpae7%2Fuploads%2Fgit-blob-4d2009b2fde99a7f2b787ff5eccd92ab20ac63d5%2Fimage%20(1270).png?alt=media" alt=""><figcaption></figcaption></figure>

On the auth client, you can instead obtain the local User ID directly from the `M2_WebServiceProfileDataProvider` world service (see [World Services](/platform-documentation/creation/unreal-development/features-and-tutorials/helpers-and-extras/world-services.md))

<figure><img src="https://970394512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft3SBfOIsRz4GCNFFpae7%2Fuploads%2Fgit-blob-631fc76beba4c5f74e08c52382870238b8ec5a9d%2Fimage%20(1271).png?alt=media" alt=""><figcaption></figcaption></figure>

## UserID to Morpheus Actor

Each authenticated user in Morpheus has a `UserID` but how can I obtain the `MorpheusActor` that represents this `UserID` in the game world?

### M2 UserID Tracker Subsystem

The `UM2_UserIdTrackerSubsystem` is a `World` Subsystem that tracks player `MorpheusActors` and their `UserIDs` . It contains a mapping between a `UserID` to the user's currently active `MorpheusActor` if the User exists in the game world.

For example, you can do this in Blueprints to obtain the `MorpheusActor` belonging to a given `UserID`. (either stored via a raw string, or the `FUniqueNetId` type).

<figure><img src="https://970394512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft3SBfOIsRz4GCNFFpae7%2Fuploads%2FJNfjgUA51g0VUksUE9d7%2Fimage.png?alt=media&amp;token=76b89532-232f-4d51-a287-876c51e971dc" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.otherside.xyz/platform-documentation/creation/unreal-development/features-and-tutorials/helpers-and-extras/the-user-id-replication-component.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
