1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00

fix usernmae

This commit is contained in:
shylinux 2018-12-12 10:16:37 +08:00
parent 62cb4c8cac
commit d87448ade9

View File

@ -976,6 +976,9 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
if !right {
login = m.Spawn().Cmd("session").Appendv("login").(*ctx.Message)
if login != nil && !m.Options("username") {
m.Option("username", login.Cap("stream"))
}
}
if login != nil {
http.SetCookie(w, &http.Cookie{Name: "sessid", Value: login.Cap("sessid"), Path: "/"})