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:
parent
e1e5c02152
commit
6c829a0d63
1 changed files with 5 additions and 1 deletions
|
@ -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});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue