Here I’m configured the custom DB everything working fine but the Password change screen only got an error I have attached the log and screen view for change the password please take a look and help me out.
Here I’m configured the custom DB everything working fine but the Password change screen only got an error I have attached the log and screen view for change the password please take a look and help me out.
Hi @Vijayan_Murugan,
Thanks for joining the Community!
Would you private messaging me your tenant name so that I can take a look at your custom DB settings?
Thank you!
Stephanie
Update: @Vijayan_Murugan was able to resolve the script error by using the Real-time Webtask Logs Extension extension and loging the result.
The template script provided in the docs expects the db results to be an array:
bcrypt.hash(newPassword, 10, function(err, hash) {
if (err) return callback(err);
connection.query(query, [ hash, email ], function(err, results) {
if (err) return callback(err);
callback(null, results.length > 0);
});
});
The script was determining the password change as a failure because results
is not an array in this case. This was resolved by updating the script to:
bcrypt.hash(newPassword, 10, function(err, hash) {
if (err) return callback(err);
connection.query(query, [ hash, email ], function(err, results) {
if (err) return callback(err);
callback(null, results); // <-- updating this line
});
});
updated line should be like this
callback(null,results && results.affectedRows>0);
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.