Thank you for your input on this. Unfortunately, this functionality is not supported out of the box in the Backend Services API, but you may want to consider the following approach:
1. Open the Cloud Code for the Users content type.
2. In the beforeUpdate
event register a logic that verifies if the update is on the Email field of the user registration. If YES - make an additional call to Users
by the Id
of this user and set the property IsVerified
. Note that you need to make the call with a Master Key authentication, e.g. instantiate the Everlive instance with
3. Pass to the current context of the beforeUpdate
event a variable that contains the state of the user, for example:
3. In the afterUpdate
event, verify the context for change in the email field:
// resend verification email
You can read more about this topic in this documentation article
. How to make external calls from the Cloud Code is explained here
Unfortunately, currently our security API does not allow toggling the IsVerified
property of a user registration even with a Master Key authentication. This is possible only when calling the verify endpoint described in the article above. We decided that exposing the ability to set this property would be useful in custom verification scenarios. This is expected to be deployed to our Live environment within 24 hours and you should be able to implement the above workflow with no impediments. I will update this thread with the progress on this task.
Let me know if you have questions.