Include username in password reset email (#3969)

When user resets his password, he does it by filling his email. But often he could also not remember his username, which he needs for logging in. I think it's better to include the username in the password reset email, what do you think?
This commit is contained in:
rihadavid
2017-07-02 22:20:25 +02:00
committed by Florent Vilmart
parent 457e21d80f
commit 287810443b

View File

@@ -213,7 +213,8 @@ export class UserController extends AdaptableController {
defaultResetPasswordEmail({link, user, appName, }) {
const text = "Hi,\n\n" +
"You requested to reset your password for " + appName + ".\n\n" +
"You requested to reset your password for " + appName +
(user.get('username') ? (" (your username is '" + user.get('username') + "')") : "") + ".\n\n" +
"" +
"Click here to reset it:\n" + link;
const to = user.get("email") || user.get('username');