mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Current user data update
This commit is contained in:
parent
5916844835
commit
4f8ac2a4fd
@ -114,9 +114,9 @@ function ghostLocals(req, res, next) {
|
||||
api.users.read({id: req.session.user}).then(function (currentUser) {
|
||||
_.extend(res.locals, {
|
||||
currentUser: {
|
||||
name: currentUser.attributes.name,
|
||||
email: currentUser.attributes.email,
|
||||
image: currentUser.attributes.image
|
||||
name: currentUser.name,
|
||||
email: currentUser.email,
|
||||
image: currentUser.image
|
||||
}
|
||||
});
|
||||
next();
|
||||
@ -272,7 +272,7 @@ when(ghost.init()).then(function () {
|
||||
server.use('/ghost/upload/', express.multipart({uploadDir: __dirname + '/content/images'}));
|
||||
server.use('/ghost/debug/db/import/', express.multipart());
|
||||
|
||||
// Session handling
|
||||
// Session handling
|
||||
// Pro tip: while in development mode cookieSession can be used
|
||||
// to keep you logged in while restarting the server
|
||||
server.use(express.cookieParser());
|
||||
|
Loading…
Reference in New Issue
Block a user