1
0
Fork 0

ignore email signups that already exist and are verified, fixes #9

2015
joates 10 years ago
parent abaa8eee7c
commit baeab714db

@ -19,6 +19,9 @@ module.exports = function(db) {
var obj = {}
, email = sanitize(params.query.email)
db.get(email, function(err, value) {
if ((err && err.type == 'NotFoundError') || ! value.verified) {
console.log('got email:', params.query)
obj.token = rn()
@ -40,7 +43,6 @@ module.exports = function(db) {
from : config.email.from
, to : email
, subject: config.email.subject
//, link : link
, text : config.email.bodyText.replace(/\%link\%/, link)
}
@ -55,6 +57,9 @@ module.exports = function(db) {
return res.end()
})
})
}
}
} else {
error('invalid input: '+ JSON.stringify(params.query))
}

Loading…
Cancel
Save