mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 07:10:30 +01:00
closes #2391
This commit is contained in:
@@ -118,6 +118,12 @@
|
||||
return res.redirect(nconf.get('relative_path') + '/register' + (err.message ? '?error=' + err.message : ''));
|
||||
}
|
||||
|
||||
if (userData.username.length < meta.config.minimumUsernameLength) {
|
||||
return res.redirect(nconf.get('relative_path') + '/register?error=[[error:username-too-short]]');
|
||||
} else if (userData.username.length > meta.config.maximumUsernameLength) {
|
||||
return res.redirect(nconf.get('relative_path') + '/register?error=[[error:username-too-long]]');
|
||||
}
|
||||
|
||||
user.create(userData, function(err, uid) {
|
||||
if (err || !uid) {
|
||||
return res.redirect(nconf.get('relative_path') + '/register');
|
||||
|
||||
Reference in New Issue
Block a user