|
|
|
@ -50,7 +50,7 @@ module.exports = function (User) {
|
|
|
|
|
var token = utils.generateUUID();
|
|
|
|
|
var registerLink = nconf.get('url') + '/register?token=' + token + '&email=' + encodeURIComponent(email);
|
|
|
|
|
|
|
|
|
|
var oneDay = 86400000;
|
|
|
|
|
var expireIn = (parseInt(meta.config.inviteExpiration, 10) || 1) * 86400000;
|
|
|
|
|
|
|
|
|
|
async.waterfall([
|
|
|
|
|
function (next) {
|
|
|
|
@ -76,7 +76,7 @@ module.exports = function (User) {
|
|
|
|
|
db.set('invitation:email:' + email, token, next);
|
|
|
|
|
},
|
|
|
|
|
function (next) {
|
|
|
|
|
db.pexpireAt('invitation:email:' + email, Date.now() + oneDay, next);
|
|
|
|
|
db.pexpireAt('invitation:email:' + email, Date.now() + expireIn, next);
|
|
|
|
|
},
|
|
|
|
|
function (next) {
|
|
|
|
|
User.getUserField(uid, 'username', next);
|
|
|
|
|