diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js index 64823e74b7..c8de5c60f1 100644 --- a/src/controllers/authentication.js +++ b/src/controllers/authentication.js @@ -82,7 +82,7 @@ authenticationController.register = function (req, res) { return res.status(400).send(err.message); } - if (req.body.userLang) { + if (data.uid && req.body.userLang) { user.setSetting(data.uid, 'userLang', req.body.userLang); }