|
|
@ -60,12 +60,15 @@ func InitContext() martini.Handler {
|
|
|
|
// Get user from session if logined.
|
|
|
|
// Get user from session if logined.
|
|
|
|
user := auth.SignedInUser(session)
|
|
|
|
user := auth.SignedInUser(session)
|
|
|
|
ctx.User = user
|
|
|
|
ctx.User = user
|
|
|
|
ctx.IsSigned = ctx != nil
|
|
|
|
ctx.IsSigned = user != nil
|
|
|
|
|
|
|
|
|
|
|
|
data["IsSigned"] = true
|
|
|
|
data["IsSigned"] = ctx.IsSigned
|
|
|
|
data["SignedUser"] = user
|
|
|
|
|
|
|
|
data["SignedUserId"] = user.Id
|
|
|
|
if user != nil {
|
|
|
|
data["SignedUserName"] = user.LowerName
|
|
|
|
data["SignedUser"] = user
|
|
|
|
|
|
|
|
data["SignedUserId"] = user.Id
|
|
|
|
|
|
|
|
data["SignedUserName"] = user.LowerName
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
c.Map(ctx)
|
|
|
|
c.Map(ctx)
|
|
|
|
c.Map(data)
|
|
|
|
c.Map(data)
|
|
|
|