mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Copy to session.user
, for compatibility
This commit is contained in:
parent
a0f156e1a9
commit
636b1fe9e2
1 changed files with 2 additions and 0 deletions
|
@ -46,6 +46,8 @@ module.exports = AuthenticationController =
|
|||
req.sessionStore.generate(req)
|
||||
for key, value of oldSession
|
||||
req.session[key] = value
|
||||
# copy to the old `session.user` location, for backward-comptability
|
||||
req.session.user = req.session.passport.user
|
||||
req.session.save (err) ->
|
||||
if err?
|
||||
logger.err {user_id: user._id}, "error saving regenerated session after login"
|
||||
|
|
Loading…
Reference in a new issue