Improves validation of email parameters in Configuration

This commit is contained in:
Florent Vilmart
2016-02-28 00:15:59 -05:00
parent 2183b0be82
commit 6aa38ea8ca
4 changed files with 34 additions and 30 deletions

View File

@@ -162,16 +162,12 @@ export class UserController extends AdaptableController {
const token = encodeURIComponent(user._perishable_token);
const username = encodeURIComponent(user.username);
let link = `${this.config.requestResetPasswordURL}?token=${token}&username=${username}`
if (!user.username) {
console.log('No username...');
}
let options = {
appName: this.config.appName,
link: link,
user: inflate('_User', user),
};
appName: this.config.appName,
link: link,
user: inflate('_User', user),
};
if (this.adapter.sendPasswordResetEmail) {
this.adapter.sendPasswordResetEmail(options);