Forgot password link not working
Forgot password link not working
How to make the Forgot Password link in Logon.jsp work. When I click on the link
I get these errors
Re: Forgot password link not working
the error is exactly what it says.
you have to set a checkbox in a process.
you have to set a checkbox in a process.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 2413
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Forgot password link not working
ForgottenPassword process - Handles Forgotten Password Checked.
Rule 1:
ENTER NEW ForgottenPassword (is a Non Persisted BO called ForgottenPassword with Attributes....LoginName (50) and NewPassword (20) )
The Form only shows the LoginName
Rule 2:
IF NOT(EXISTS SystemUser WHERE (SystemUser.LoginName=ForgottenPassword.LogonName))
THEN REPORT ERROR 'There is no User with that Login Name.'
ELSE
FIND SystemUser WHERE SystemUser.LoginName=ForgottenPassword.LogonName
ForgottenPassword.NewPassword=GENERATE_PWD(8,10,1,1,1)
SystemUser.Password=ForgottenPassword.NewPassword
SEND ForgottenPasswordEmail TO SystemUser (Note.... You need to create a Notification Email here called ForgottenPasswordEmail )
DISPLAY MESSAGE 'Your new password has been sent to your email address'
Rule 3:
EXEC_SCRIPT `AwareApp.logout('`+ SystemSettings.BaseURL +`');` Where BaseURL is the Landing Page URL of your app.
Rule 1:
ENTER NEW ForgottenPassword (is a Non Persisted BO called ForgottenPassword with Attributes....LoginName (50) and NewPassword (20) )
The Form only shows the LoginName
Rule 2:
IF NOT(EXISTS SystemUser WHERE (SystemUser.LoginName=ForgottenPassword.LogonName))
THEN REPORT ERROR 'There is no User with that Login Name.'
ELSE
FIND SystemUser WHERE SystemUser.LoginName=ForgottenPassword.LogonName
ForgottenPassword.NewPassword=GENERATE_PWD(8,10,1,1,1)
SystemUser.Password=ForgottenPassword.NewPassword
SEND ForgottenPasswordEmail TO SystemUser (Note.... You need to create a Notification Email here called ForgottenPasswordEmail )
DISPLAY MESSAGE 'Your new password has been sent to your email address'
Rule 3:
EXEC_SCRIPT `AwareApp.logout('`+ SystemSettings.BaseURL +`');` Where BaseURL is the Landing Page URL of your app.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
-
- Posts: 1460
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Forgot password link not working
Thanks Mark, I've never applied the time to consider the workflow for this.
I'd add that best practice is not to say that the login / email cannot be found, but instead generally state if there's a matching email address then the new password will be sent - this prevents fishing for logins.
I'd add that best practice is not to say that the login / email cannot be found, but instead generally state if there's a matching email address then the new password will be sent - this prevents fishing for logins.
Re: Forgot password link not working
Unfortunately I did all the steps you described and I get this error when I click on the link Forgot Passwordeagles9999 wrote: ↑Fri Apr 21, 2023 1:08 am ForgottenPassword process - Handles Forgotten Password Checked.
Rule 1:
ENTER NEW ForgottenPassword (is a Non Persisted BO called ForgottenPassword with Attributes....LoginName (50) and NewPassword (20) )
The Form only shows the LoginName
Rule 2:
IF NOT(EXISTS SystemUser WHERE (SystemUser.LoginName=ForgottenPassword.LogonName))
THEN REPORT ERROR 'There is no User with that Login Name.'
ELSE
FIND SystemUser WHERE SystemUser.LoginName=ForgottenPassword.LogonName
ForgottenPassword.NewPassword=GENERATE_PWD(8,10,1,1,1)
SystemUser.Password=ForgottenPassword.NewPassword
SEND ForgottenPasswordEmail TO SystemUser (Note.... You need to create a Notification Email here called ForgottenPasswordEmail )
DISPLAY MESSAGE 'Your new password has been sent to your email address'
Rule 3:
EXEC_SCRIPT `AwareApp.logout('`+ SystemSettings.BaseURL +`');` Where BaseURL is the Landing Page URL of your app.
Re: Forgot password link not working
Now it works. Thank you eagle9999.
The only thing that must be added at the end of the code for the process is this line: SystemUser.EmailAddress = SystemUser.LoginName
so that the new password can be sent by email after having of course configured the BO SystemUser for it sends Email.
And don't forget either that the link Forgot password will only work when your application is in Current, because in Test it doesn't work.
The only thing that must be added at the end of the code for the process is this line: SystemUser.EmailAddress = SystemUser.LoginName
so that the new password can be sent by email after having of course configured the BO SystemUser for it sends Email.
And don't forget either that the link Forgot password will only work when your application is in Current, because in Test it doesn't work.
-
- Posts: 2413
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Forgot password link not working
Well done Max. Glad you got it working.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....