mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
closes #613, fixed allowRegistration incase its undefined
This commit is contained in:
@@ -390,7 +390,7 @@ var path = require('path'),
|
||||
res.redirect('/user/' + userslug);
|
||||
});
|
||||
return;
|
||||
} else if(route === 'register' && parseInt(meta.config.allowRegistration, 10) === 0) {
|
||||
} else if(route === 'register' && meta.config.allowRegistration !== undefined && parseInt(meta.config.allowRegistration, 10) === 0) {
|
||||
return res.redirect('/403');
|
||||
} else if (loginRequired.indexOf(route) !== -1 && !req.user) {
|
||||
return res.redirect('/403');
|
||||
|
||||
Reference in New Issue
Block a user