Removed redundant check for empty email address field
This commit is contained in:
@ -50,7 +50,7 @@ var secrets = require('../config/secrets');
|
||||
password we can simply authenticate them and redirect to a logged in location - usually
|
||||
home page.
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
@ -82,7 +82,6 @@ exports.postForgot = function(req, res) {
|
||||
workflow.on('validate', function() {
|
||||
|
||||
// Check for form errors
|
||||
req.assert('email', 'Email cannot be blank.').notEmpty();
|
||||
req.assert('email', 'Please enter a valid email address.').isEmail();
|
||||
var errors = req.validationErrors();
|
||||
|
||||
@ -170,7 +169,7 @@ exports.postForgot = function(req, res) {
|
||||
to: user.profile.name + ' <' + user.email + '>',
|
||||
from: 'hackathon@starter.com', // TODO parameterize
|
||||
subject: 'Password Reset Link',
|
||||
text: 'Hello from hackathon-starter. Your password reset link is:' + '\n\n' + req.protocol +'://'+ req.headers.host +'/reset/'+ user.id +'/'+ token
|
||||
text: 'Hello from hackathon-starter. Your password reset link is:' + '\n\n' + req.protocol + '://' + req.headers.host + '/reset/' + user.id + '/' + token
|
||||
};
|
||||
|
||||
// send email
|
||||
|
Reference in New Issue
Block a user