Created
February 6, 2014 21:40
-
-
Save dasibre/8853021 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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