# Missing user ID and inconsistent payload data in the onRegistration hook

**URL:** <https://forum.klai.studio/t/missing-user-id-and-inconsistent-payload-data-in-the-onregistration-hook/1313>\
**Category:** Support\
**Created:** [October 31, 2026, 2:00pm UTC](https://forum.klai.studio/t/missing-user-id-and-inconsistent-payload-data-in-the-onregistration-hook/1313 "2026-10-31T14:00:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BetterForms](https://forum.klai.studio/user_avatar/forum.klai.studio/betterforms/32/295_2.png) [@BetterForms](https://forum.klai.studio/u/BetterForms)\
**Post date:** [October 31, 2026, 2:00pm UTC](https://forum.klai.studio/t/missing-user-id-and-inconsistent-payload-data-in-the-onregistration-hook/1313/1 "2026-10-31T14:00:40Z")

</div>

**Problem:** The `user.onRegistration` hook may omit the new user’s `id` and inconsistently omit other fields such as `email`. Payloads were observed containing only `avatar`, `email`, `isVerified`, and `modid`; later payloads contained an empty `data.user` object, with email sometimes in `data.model` or nowhere. This occurred on server version 3.5.111 with the DAPI gateway and was confirmed by logging the raw inbound `data.user` payload.

**Workaround:** Extract the email from `data.user`, fall back to `data.model`, and use API - User CRUD to look up the user ID. This fails when neither location contains the email. Other hooks, including `user.onAuthNotifier` and `formsService.onFormRequest`, still provide the full user object and ID, so they can be used when applicable.

**Next step:** Treat missing identity data in `onRegistration` as a possible regression, particularly after the JWT authentication rollout, and provide sample payloads/domain details to support investigation. A supported replacement for identifying the newly registered user was not established in the thread.

* * *

### Original Slack Thread

```plaintext
User U07J5QL1N07: I used to get BF User id passed alongside the onRegistration hook but it doesn't look like that information is getting passed over anymore. Should we now make a GET to the Helper File to retrieve user details after creation? It looks like the registration is just passing the avatar, email, and isVerified fields.
User UBBJX2EHM: hmmm it shoudl be, let me check
User UBBJX2EHM: We recently rolled JWT auth system creds so can you try a refresh.
User U07J5QL1N07: Charles, thanks for checking this out so quickly. I'm still not seeing the User Id returned in the $$BF_User variable. I am registering a new test user (me) so I just deleted the records and started fresh. I'm getting the email, avater, IsVerified, and modId, but no BF User Id
User UBBJX2EHM: Can you bring this to the workshop tomorrow sorry I just noticed this message now
User U09ERL2V9JP: I think we’re seeing the same thing as Brett. Server version 3.5.111, gateway DAPI.

What `data.user` contains in `user.onRegistration`:
 • Wed 10/28 AM, from the Login form: `avatar`, `email`, `isVerified: false`, `modid: 0`. No `id`.
 • Wed 10/28 PM, from the `Auth - Register` form (second step from the verification email): `data.user` is `{}`. The email was only in `data.model`.
 • Today 10/29, from the Login form: `data.user` is `{}` again, and no email anywhere in the payload. So no way to identify the user from that hook at all.

I confirmed this by logging `JSONGetElement ( $$BF_PAYLOAD ; "data.user" )` straight from the inbound payload, so it isn’t anything on our dispatcher side. `user.onAuthNotifier` and `formsService.onFormRequest` still carry the full user (with `id`).

Our workaround for now: take the email from `data.user`, falling back to `data.model`, then look up the `id` with API - User CRUD. That didn’t work for today’s registration, since the email wasn’t in `data.model` either.

<@UBBJX2EHM>: is this change intentional (related to the JWT rollout)? If so, what’s the supported way to identify the new user in `onRegistration`? And what does “refresh” involve on our end? Happy to send sample payloads.
User UBBJX2EHM: No if confirmed it sounds like a possible regression thoguh.
Can you DM us the domain

```
