From 750c19014a674ddabecddb985178a5b57e1b3dd6 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Tue, 17 Sep 2013 03:08:36 +0100 Subject: [PATCH] Populating admin email with user signup email closes #775 --- core/server/controllers/admin.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/core/server/controllers/admin.js b/core/server/controllers/admin.js index 3d17bd787e..93a7cfc617 100644 --- a/core/server/controllers/admin.js +++ b/core/server/controllers/admin.js @@ -171,12 +171,13 @@ adminControllers = { email: email, password: password }).then(function (user) { - - if (req.session.user === undefined) { - req.session.user = user.id; - } - res.json(200, {redirect: '/ghost/'}); - }, function (error) { + api.settings.edit('email', email).then(function () { + if (req.session.user === undefined) { + req.session.user = user.id; + } + res.json(200, {redirect: '/ghost/'}); + }); + }).otherwise(function (error) { res.json(401, {error: error.message}); });