# User object empty on Post Registration Flow

**URL:** <https://community.auth0.com/t/user-object-empty-on-post-registration-flow/72493>\
**Category:** Get Help\
**Tags:** post-user-registrati, auth0\
**Created:** [November 2, 2021, 2:29pm UTC](https://community.auth0.com/t/user-object-empty-on-post-registration-flow/72493 "2021-11-02T14:29:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Poolshark](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/poolshark/32/30418_2.png) [@Poolshark](https://community.auth0.com/u/Poolshark)\
**Post date:** [November 2, 2021, 2:29pm UTC](https://community.auth0.com/t/user-object-empty-on-post-registration-flow/72493/1 "2021-11-02T14:29:14Z")

</div>

Hi!

I have played around with Actions and Flows a bit and was trying to implement a **Post Registration Flow** as follows:

- I send an organization invitation email to the user
- the user clicks the link and registers

I was expecting that the `event.user` object includes all necessary user data but unfortunately the object only contains the email address. Why is that? This makes the Post Registration Flow pretty useless.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 4, 2021, 9:38pm UTC](https://community.auth0.com/t/user-object-empty-on-post-registration-flow/72493/3 "2021-11-04T21:38:16Z")

</div>

Hi @Poolshark,

> [@Poolshark](#):
>
> I was expecting that the `event.user` object includes all necessary user data but unfortunately the object only contains the email address. Why is that?

The post-user registration action trigger is designed to notify another system that a user has registered for your application. Use this type of action to execute asynchronous tasks such as adding a user ID to an external system or sending a Slack notification.

[More info.](https://community.auth0.com/t/can-i-use-a-post-user-registration-action-or-hook-to-update-a-user/63423)

In this case, you can use a post-login action with a conditional to determine whether or not to send the invite/is a first login.

---

<div class="post-metadata">

**Author:** ![Poolshark](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/poolshark/32/30418_2.png) [@Poolshark](https://community.auth0.com/u/Poolshark)\
**Post date:** [November 5, 2021, 9:45am UTC](https://community.auth0.com/t/user-object-empty-on-post-registration-flow/72493/4 "2021-11-05T09:45:56Z")

</div>

Hi @dan.woda,

> [@dan.woda](#):
>
> The post-user registration action trigger is designed to notify another system that a user has registered for your application. Use this type of action to execute asynchronous tasks such as adding a user ID to an external system or sending a Slack notification.

I have read, the docs but I do not understand why we do not have access to the entire user data including `app_metadata` and `user_metadata`? If I understand this right, at **Post Register** the user is already stored in the database - including all necessary information. In my particular case I would like to add **OR** update the user in an external database, depending on the app\_metadata which I generate at the organisation invitation.

However, I have solved this with a **Pre Registration** action, which adds a `hasRegistered` flag to the user’s `app_metadata`. Then I have 2 **Post Login** actions - one for a signup where the user has to be **added** to the external database and one where the user gets **updated** in the external database. The Actions get fired if:

- `hasRegistered = true` in `app_metadata` → user gets added
- `hasRegistered && isCreated` in `app_metadata` → user gets updated

In both Post Login Actions I unset the values `hasRegisterd` and `isCreated` which lets the user login normally once the registration is done.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 20, 2021, 9:46am UTC](https://community.auth0.com/t/user-object-empty-on-post-registration-flow/72493/5 "2021-11-20T09:46:41Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
