From 287810443b21fa30b392517b5dc6e136e78f3a24 Mon Sep 17 00:00:00 2001 From: rihadavid Date: Sun, 2 Jul 2017 22:20:25 +0200 Subject: [PATCH] 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? --- src/Controllers/UserController.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controllers/UserController.js b/src/Controllers/UserController.js index aa8e38cc..bf7934c4 100644 --- a/src/Controllers/UserController.js +++ b/src/Controllers/UserController.js @@ -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');