mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
add "Admin Approval for IPs", which works like Normal for new users and Admin Approval for sockpuppet accounts (#4882)
This commit is contained in:
@@ -63,6 +63,16 @@ authenticationController.register = function(req, res, next) {
|
||||
registerAndLoginUser(req, res, userData, next);
|
||||
} else if (registrationType === 'admin-approval') {
|
||||
addToApprovalQueue(req, userData, next);
|
||||
} else if (registrationType === 'admin-approval-ip') {
|
||||
db.sortedSetCard('ip:' + req.ip + ':uid', function(err, count) {
|
||||
if (err) {
|
||||
next(err);
|
||||
} else if (count) {
|
||||
addToApprovalQueue(req, userData, next);
|
||||
} else {
|
||||
registerAndLoginUser(req, res, userData, next);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
], function(err, data) {
|
||||
|
||||
Reference in New Issue
Block a user