Post User Registration user does not have user.name property

Thanks for your response @rueben.tiow

I’m not sure I understand your answer based on the documentation you’ve linked to. According to the event object documentation, the user is a property under the event and it has the name directly on it.

I’m currently doing something like this in my action:

exports.onExecutePostUserRegistration = async (event, api) => {
  const request = require('request');

  console.log(event.user)
  console.log(`name`, event.user.name)

  const firstName = event.user.name ? event.user.name.split(' ')[0] : ''
  const lastName = event.user.name ? event.user.name.split(' ')[1] : ''

My printouts show me that the user exists but it just doesn’t have the name. Where does the user come from in your example? Would you be able to show me an example?

Thanks for your help,
Giles