Hey, I’m working on update email structure, what I’ve found that if I use :
the user status stays enabled,
How can I set the user status to EMAIL_CONFIRMATION_PENDING so the resendEmailConfirmation work and then validating the new email
Note: I can remove the old user and registering him again and then the status will become EMAIL_CONFIRMATION_PENDING but I’m searching for a better solution
You can change userStatus using business logic with Coderunner API key.
Also, I think you have a better way to solve that issue.
If a user wants to change the email he definitely knows what email he entering, so I don’t know any reason for confirming a new email address. A good choice is confirming action by sending a message to a phone, or enter a password user changes address to new.
You might look at other well-known sites on how it works.
I should confirm it the same reason for confirming the email address when registering
about changing userService any code example?
I found this to disable user status
but how about setting it to EMAIL_CONFIRMATION_PENDING
I do have many options(SMS, email verification code, delete old user and registering him) but if I can set userStatus to EMAIL_CONFIRMATION_PENDING that’s will be the best solution by code in business logic
This is the request json for the business logic api service:
and this is the response json of the same api service in business logic:
I’m using Backendless.UserService.update(user) inside this service, and i’m updating the user with the new email
@adel_kasno thank you for information. I have checked your application and now I understand why it does not work. The reason is that event handlers does not work if some action triggered from business logic. So to create function: