# Morpheus UserID

## UserID Replication Component

The `M2_UserIDReplicationComponent` is a Morpheus Actor Component added to all `M2M_CharacterBase` classes. 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="/files/6ZVLaqi0q4N3LSLJ8yXZ" 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="/files/vcxHODgrTt1jvoxbsLAm" alt=""><figcaption></figcaption></figure>

## UserID to Morpheus Actor

Each authenticated user in Morpheus should have a `UserID` but how to obtain the `MorpheusActor` that represents this `UserID` in the game world?

### UserID Tracker Subsystem

The `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` and vice versa.

{% @blueprintue-embed/embed url="<https://nextjs-boilerplate-jl63.vercel.app/ee83d0b8-7778-4323-8c2d-a5ea020ab7ec>" %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
