Hey,
I was told there was a solution to what I am trying, but it is probably a bit of a broader issue and was asked to post my question here:
For our app, we want to (to start with) manually add new users through the console. This all works fine, but at this moment we need to manually provide a password, but we would like the user to set their own.
The ideal situation would be when we add a new user to the user table, an e-mail is sent to that new user welcoming them and asking them to change their password.
Is something like this possible?
Hello @Joey_Fladderak
Create new system page
Remember the property name, we will use it below
Then we have to get the link on this page.
Publish container
Open published app preview
The URL is for the main system page.
Change the part of the URL to your new page and save it somewhere
...system/index.html?page=send-password-form
Go to email templates
Template “user made registration”
Add a link to the new system page to the template.
The link must contain the parameter identityValue
. We use it for button logic (3-rd screenshot)
My link looks like:
https://my-sub-domain/api/files/ui-builder/containers/system/index.html?page=send-password-form&identityValue={identity_value}
Then enable “User requests password recovery by link” template
"
But this trigger will fire when the user has registered himself too
Regards
Thanks Viktor,
I got it working mostly. I get the e-mail and the link works. However, when I press the button it doesn’t do anything. Did I miss something?
And my URL is: https://subdomain.backendless.app/api/files/web/system/index.html?page=set-password-form&identityValue={identity_value}
@Joey_Fladderak
On button click send to email new mail with change password form
I’m not sure what you mean.
When I click the button, I don’t get any mail. Nothing happens.
@Joey_Fladderak
Are you receiving the first letter? From “User made registration” template?
If yes. Follow this link you send (it should be our new system page). And URL of this page should looks like:
https://potentbath.backendless.app/api/files/ui-builder/containers/system/index.html?page=send-password-form&identityValue=John@gmail.com
Is it so?
Yes. When I enter the details in the user table I get an e-mail from the (adjusted) ‘User made registration’ with a link to the page with the button. The exact link is: https://subtlebelief.backendless.app/api/files/web/system/index.html?page=set-password-form&identityValue=joey@springlab.nl
When I press the button on that page, nothing happens. (no e-mail is sent)
@Joey_Fladderak
Can you check netWork request on button click?
This is my request:
Also, be sure the check box “don’t send email for the event” of template “User requests password recovery by link” is false (MB you did not save it) and also check spam box
@Joey_Fladderak
Check your button logic then publish container again.
If it all not help, can you provide as your appId
This is my request, so it seems to work
And the checkbox is set to false
Logic is the same as you posted, (re)published it again, but still nothing. Also not in my spam folder.
My appID is: CB5F0D27-C339-A133-FFFF-06A6F3EC8700
I just received an e-mail with a request to change the password. Not sure if you did something or if it is a very late response?
@Joey_Fladderak
I did not do anything. I think you just update your published app code
There may be a delay in sending emails.
Alright, then I will monitor if this will keep working correctly.
Also, with this solution proposed. I assume it is not possible to directly send the “User requests password recovery by link” mail or directly go to the password change page when a user is registered?
@Joey_Fladderak
I have not found a solution to this issue in one letter