-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix create user error #1680
Fix create user error #1680
Conversation
plugins/auth/local/index.js
Outdated
LocalAuth.prototype.internalRegisterUser = function (user, cb) { | ||
if (!user.email || !user.password || !user.retypePassword) { | ||
LocalAuth.prototype.internalRegisterUser = function(retypePasswordRequired, user, cb) { | ||
if (!user.email || !user.password) { | ||
return cb(new auth.errors.UserRegistrationError('email, password and retyped password are required!')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot I'll fix that now
plugins/auth/local/index.js
Outdated
if (user.password !== user.retypePassword) { | ||
return cb(new auth.errors.UserRegistrationError('password and retyped password must match!')); | ||
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers for amending. Can we lose the else
here, unless I'm missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we can! 2 ticks
Fixes #1677