From a8c649cca64c7baad12a3d007167e014ddf438dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 23 May 2017 17:41:40 -0400 Subject: [PATCH] check data.uid --- src/controllers/authentication.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }