resetPassword.js
717 Bytes
import _ from 'lodash';
import { Accounts } from 'meteor/accounts-base';
Accounts.emailTemplates.resetPassword = {
subject() {
return '[YoungDesk] Reset Your Password';
},
text(user, url) {
console.log(user);
const userEmail = user.emails[0].address;
const theUrl = Meteor.absoluteUrl(`?enter=reset&token=${_.last(url.split('/'))}`);
// const theUrl = decodeURI(`\u003D`);
return (
`
Hello, ${user.firstName}!
A password reset has been requested for the account related to this address.
To reset the password, visit the following link:
${theUrl}
If you did not request this reset, please ignore this email.
`
);
},
};