From 4bb8762746977c40e2220e206f1825e2ab12fe2d Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 4 Jun 2014 18:54:11 -0400 Subject: [PATCH] send in the entire registration form for userData --- src/routes/authentication.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/routes/authentication.js b/src/routes/authentication.js index 9e13492785..a157520b8f 100644 --- a/src/routes/authentication.js +++ b/src/routes/authentication.js @@ -83,12 +83,14 @@ if(meta.config.allowRegistration !== undefined && parseInt(meta.config.allowRegistration, 10) === 0) { return res.send(403); } + + var userData = {}; - var userData = { - username: req.body.username, - password: req.body.password, - email: req.body.email - }; + for (var key in req.body) { + if (req.body.hasOwnProperty(key)) { + userData[key] = req.body[key]; + } + } plugins.fireHook('filter:register.check', req, res, userData, function(err, req, res, userData) { if (err) {