From d87448ade96584cc7a6aa981b1b4e452f8ceb49d Mon Sep 17 00:00:00 2001 From: shylinux Date: Wed, 12 Dec 2018 10:16:37 +0800 Subject: [PATCH] fix usernmae --- src/contexts/web/web.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/contexts/web/web.go b/src/contexts/web/web.go index fffab980..5ade619c 100644 --- a/src/contexts/web/web.go +++ b/src/contexts/web/web.go @@ -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: "/"})