I just saw that user.verify() replaces only first instance of {href} in text here:
|
options.text = options.text.replace('{href}', options.verifyHref); |
It would be better if instead of:
options.text = options.text.replace('{href}', options.verifyHref);
we would use:
options.text = options.text.replace(/\{href\}/g, options.verifyHref);
That way we could send email with live link using <a href="{href}">verify</a>
and in case someone wouldn't have html email then just plain text in one go.
I just saw that user.verify() replaces only first instance of {href} in text here:
loopback/common/models/user.js
Line 436 in 6964914
It would be better if instead of:
options.text = options.text.replace('{href}', options.verifyHref);we would use:
options.text = options.text.replace(/\{href\}/g, options.verifyHref);That way we could send email with live link using
<a href="{href}">verify</a>and in case someone wouldn't have html email then just plain text in one go.