When I did set up my website to use Backendless a while ago, I remember when the “Email Confirmation” option is enabled, it used to send an email confirmation to the new address + updated ‘userStatus’ to 'Pending confirmation" if I used to update the email (identity) field.
This is pretty weird behavior. I just created an account and received a confirmation email.
Maybe you noticed at what point it stopped working for you?
Can you provide your Application Id?
When creating a new user, it works fine, but it doesn’t trigger email confirmation or change the user status to ‘pending confirmation’ if I change the email for an existing user. I do remember it used to do that a while back.
For reference, my app id is 92E6BE6B-8DE1-D74E-FFC3-F1B602528600
You can use this method after changing the user email to new.
Backendless.Users.createEmailConfirmation(email)
Now this method has no documentation and works only with JS/Swift - SDK
Also, we want to refactor it in future releases to work with identity, not only emails.
Thanks for the response. Okay, so it seems I would have to do it manually from code. But what would be your solution for this when changing the email through the Backendless portal, directly on the Users table? It doesn’t seem to work there.
Additionally, I just noticed that the Event Handler that I have for ‘afterUpdate’ in the Business Logic has the similar behavior when updating Users directly on Backendless portal: works when I call the update manually from my website but doesn’t get triggered if I update data directly on the Backendless portal. Is this a bug?
If you change email from DataBrowser, is admin action, and I don’t see any reason to confirm admin action. If your user wants to change email without your helping, you can write a code with SDK methods, and give users the possibility to change email without your help, and with a confirmation.
What about handlers - is the right behavior. Handlers work with API calls from your code, not with admins actions.
If you change email from DataBrowser, is admin action, and I don’t see any reason to confirm admin action. If your user wants to change email without your helping, you can write a code with SDK methods, and give users the possibility to change email without your help, and with a confirmation.
Right… But this has nothing to do with being the admin action. As an admin, I am updating the email for my customer, which I want to be notified that his/her email is now being used. It is a confirmation to the customer, not the admin, so it only makes sense if the ‘email confirmation’ option is enabled, no?
What about handlers - is the right behavior. Handlers work with API calls from your code, not with admins actions.
But that’s insane. Why would admin actions on DataBrowser not trigger an Event Handler action? Is this not an action if it is done by admin?
In my case, I need to notify a 3rd party service when the user data changes, and it is regardless of where it was changed from - by the user itself, or by admin through DataBrowser. How can I do this then?
According to “emails” we will consider an ability to add the “EMAIL_CONFIRMATION_PENDING” option, witch will trigger sending an email to the user. However, in order to change email and get a confirmation email I recommend you to request it using API.
According to “handlers”, let me please explain why it does not work as you expect.
DataBrowser is intended to view/modify data directly in the database, when EventHandlers is developed for handling API (app/users) actions and in the event handlers might be any logic you need. For instance there is might be validation on who make the request logged-in user or not, and in this case if you try to change data in the table you will receive an exception what’s in my opinion is much worse. So in the DataBrowser you are able to change any data skipping any BusinessLogic workflows.
Does it make sense?
Yeah, I see your logic, and it probably makes sense. For my use case though, it’s a bit silly - to notify my 3rd party service about the updated data, I would have to start building my own backend to make the change through the API instead of using your DataBrowser then. “Backend-less” in a way starts to lose it’s meaning then
So as I understand this is the only option that I have - I can only send my 3rd party a notification about the update if I change Users table data through the API? No way to do it straight from Backendless?
I would recommend you take a look at our UI-Builder system, there you can build a web app with only drag-and-drop components for UI and using Codeless for building logic for the UI.
And this app might be available only for you as for admin.