mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
closes #1724
This commit is contained in:
@@ -39,8 +39,8 @@ module.exports = function(User) {
|
||||
next((!utils.isUserNameValid(userData.username) || !userData.userslug) ? new Error('[[error:invalid-username]]') : null);
|
||||
},
|
||||
function(next) {
|
||||
if (userData.password) {
|
||||
next(!utils.isPasswordValid(userData.password) ? new Error('[[error:invalid-password]]') : null);
|
||||
if (password) {
|
||||
next(!utils.isPasswordValid(password) ? new Error('[[error:invalid-password]]') : null);
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user