Updated email input fields to username id and name
This commit is contained in:
@ -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);
|
||||||
|
@ -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')
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user