Skip to content

Instantly share code, notes, and snippets.

@dasibre
Created February 6, 2014 21:40
Show Gist options
  • Save dasibre/8853021 to your computer and use it in GitHub Desktop.
Save dasibre/8853021 to your computer and use it in GitHub Desktop.
function checkStatus(req, res, next) {
As.findOne({ email: req.body.email }, function(err, data) {
if (err) {
return next(err);
} else if ( data === null) {
return( next() );
} else if ( data.verifyStatus === true ) {
res.send('Your account has already been activated. Just head to the login page.');
} else {
res.send('An email has been send before, please check your mail to activate your account. Note that you can only get another mail after 1.5h. Thanks!');
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment