|
|
@ -83,12 +83,14 @@
|
|
|
|
if(meta.config.allowRegistration !== undefined && parseInt(meta.config.allowRegistration, 10) === 0) {
|
|
|
|
if(meta.config.allowRegistration !== undefined && parseInt(meta.config.allowRegistration, 10) === 0) {
|
|
|
|
return res.send(403);
|
|
|
|
return res.send(403);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var userData = {};
|
|
|
|
|
|
|
|
|
|
|
|
var userData = {
|
|
|
|
for (var key in req.body) {
|
|
|
|
username: req.body.username,
|
|
|
|
if (req.body.hasOwnProperty(key)) {
|
|
|
|
password: req.body.password,
|
|
|
|
userData[key] = req.body[key];
|
|
|
|
email: req.body.email
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
plugins.fireHook('filter:register.check', req, res, userData, function(err, req, res, userData) {
|
|
|
|
plugins.fireHook('filter:register.check', req, res, userData, function(err, req, res, userData) {
|
|
|
|
if (err) {
|
|
|
|
if (err) {
|
|
|
|