mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +01:00
fix: #7567, allow invite and approval at the same time
This commit is contained in:
@@ -100,7 +100,6 @@ Controllers.login = function (req, res, next) {
|
||||
var data = {};
|
||||
var loginStrategies = require('../routes/authentication').getLoginStrategies();
|
||||
var registrationType = meta.config.registrationType || 'normal';
|
||||
|
||||
var allowLoginWith = (meta.config.allowLoginWith || 'username-email');
|
||||
var returnTo = (req.headers['x-return-to'] || '').replace(nconf.get('base_url') + nconf.get('relative_path'), '');
|
||||
|
||||
@@ -117,7 +116,7 @@ Controllers.login = function (req, res, next) {
|
||||
|
||||
data.alternate_logins = loginStrategies.length > 0;
|
||||
data.authentication = loginStrategies;
|
||||
data.allowRegistration = registrationType === 'normal' || registrationType === 'admin-approval' || registrationType === 'admin-approval-ip';
|
||||
data.allowRegistration = registrationType === 'normal';
|
||||
data.allowLoginWith = '[[login:' + allowLoginWith + ']]';
|
||||
data.breadcrumbs = helpers.buildBreadcrumbs([{
|
||||
text: '[[global:login]]',
|
||||
@@ -159,7 +158,7 @@ Controllers.register = function (req, res, next) {
|
||||
var registrationType = meta.config.registrationType || 'normal';
|
||||
|
||||
if (registrationType === 'disabled') {
|
||||
return next();
|
||||
return setImmediate(next);
|
||||
}
|
||||
|
||||
var errorText;
|
||||
|
||||
Reference in New Issue
Block a user