Updated email input fields to username id and name

This commit is contained in:
Sahat Yalkabov
2013-12-05 23:24:12 -05:00
parent 1ddd639592
commit 44a985f838
3 changed files with 4 additions and 2 deletions

View File

@ -33,6 +33,8 @@ exports.getLogin = function(req, res) {
*/ */
exports.postLogin = function(req, res, next) { exports.postLogin = function(req, res, next) {
passport.authenticate('local', function(err, user, info) { passport.authenticate('local', function(err, user, info) {
console.log(user)
console.log(info)
if (err) return next(err); if (err) return next(err);
if (!user) { if (!user) {
req.flash('messages', info.message); req.flash('messages', info.message);

View File

@ -10,7 +10,7 @@ block content
span.text-muted NAME span.text-muted NAME
form(method='POST') form(method='POST')
.form-group .form-group
input.form-control(type='text', name='email', id='email', placeholder='Email', autofocus='') input.form-control(type='text', name='username', id='username', placeholder='Email', autofocus='')
.form-group .form-group
input.form-control(type='password', name='password', id='password', placeholder='Password') input.form-control(type='password', name='password', id='password', placeholder='Password')
button(type='submit') button(type='submit')

View File

@ -11,7 +11,7 @@ block content
span.text-muted NAME span.text-muted NAME
form(method='POST') form(method='POST')
.form-group .form-group
input.form-control(type='email', name='email', id='email', placeholder='Email', autofocus='', required='') input.form-control(type='email', name='username', id='username', placeholder='Email', autofocus='', required='')
.form-group .form-group
input.form-control(type='password', name='password', id='password', placeholder='Password', required='') input.form-control(type='password', name='password', id='password', placeholder='Password', required='')
.form-group .form-group