Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c914eee commit d1e38bcCopy full SHA for d1e38bc
http/controller/user.go
@@ -12,6 +12,7 @@ import (
12
13
"github.com/studygolang/studygolang/context"
14
"github.com/studygolang/studygolang/logic"
15
+ "github.com/studygolang/studygolang/model"
16
17
echo "github.com/labstack/echo/v4"
18
"github.com/polaris1119/goutils"
@@ -36,7 +37,7 @@ func (self UserController) RegisterRoute(g *echo.Group) {
36
37
func (UserController) Home(ctx echo.Context) error {
38
username := ctx.Param("username")
39
user := logic.DefaultUser.FindOne(context.EchoContext(ctx), "username", username)
- if user == nil || user.Uid == 0 {
40
+ if user == nil || user.Uid == 0 || user.Status == model.UserStatusOutage {
41
return ctx.Redirect(http.StatusSeeOther, "/users")
42
}
43
0 commit comments