0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Immediately log in newly registered users - removing the additional login step

This commit is contained in:
Adam Howard 2013-08-19 13:59:30 +01:00
parent e1e5c02152
commit 6c829a0d63

View file

@ -129,7 +129,11 @@ adminControllers = {
email_address: email,
password: password
}).then(function (user) {
res.json(200, {redirect: '/ghost/login/'});
// Automatically log the new user in, unless created by an existing account
if (req.session.user === undefined) {
req.session.user = user.id;
}
res.json(200, {redirect: '/ghost/'});
}, function (error) {
res.json(401, {message: error.message});
});