Hello community:
I have a listener for REGISTER event and it works well, but when I try to get the first and last names of the user are null, but all other fields are filled as mail, telephone, etc.
@Override
public
void onEvent(Event
event) {
if (includedEvents.contains(event.getType()))
{
if (event.getRealmId()
!= null &&
event.getUserId() !=
null) {
RealmModel
realm =
model.getRealm(event.getRealmId());
UserModel
user =
session.users().getUserById(event.getUserId(),
realm);
if
(user !=
null) {
if(isUserEnroledForClients(user,
realm)){
//Cheking the event type
if(EventType.REGISTER.equals(event.getType())){
//Sending the new data to hubspot
log.infov("Registering the
new user {0} in Hubspot...",
user.getEmail());
user.getEmail(); //IS FILLED
user.getFirstName (); //IS NULL
user.getLastName (); //IS NULL
After the registration process ends if I check the table, the new user has a firstName and lastName.
Jairo Henao Rojas
IT ROI Solutions