Issue #492 fixed

parent d485d773
...@@ -136,7 +136,7 @@ module.exports = { ...@@ -136,7 +136,7 @@ module.exports = {
supervisor.active = true; supervisor.active = true;
delete supervisor.password; delete supervisor.password;
supervisor.save(); supervisor.save();
return res.view('accountActivated', {sup: supervisor, login_url: req.protocol + '://' + req.headers.host + '/app'}); return res.view('accountActivated', {sup: supervisor, login_url: 'https://' + req.headers.host + '/app'});
}) })
.catch(function (err) { .catch(function (err) {
return res.serverError("Error when activating account " + err); return res.serverError("Error when activating account " + err);
...@@ -236,7 +236,7 @@ module.exports = { ...@@ -236,7 +236,7 @@ module.exports = {
var message = sails.__({ var message = sails.__({
phrase: 'signin_mail', phrase: 'signin_mail',
locale: params.lang || 'es-es' locale: params.lang || 'es-es'
}) + req.protocol + '://' + req.headers.host + '/sup/activate/' + sailsTokenAuth.issueToken(supervisor.id, 60*24*7); // expires in 1 week }) + 'https://' + req.headers.host + '/sup/activate/' + sailsTokenAuth.issueToken(supervisor.id, 60*24*7); // expires in 1 week
sails.log.debug("Sending activation email: \n" + message); sails.log.debug("Sending activation email: \n" + message);
mailService.mailer() mailService.mailer()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment