Browse Source

Suspended account will not diplayed to public and Closes #45

Yoginth 7 years ago
parent
commit
cb73e07ea7
1 changed files with 5 additions and 2 deletions
  1. 5 2
      routes/user/profile.go

+ 5 - 2
routes/user/profile.go

@@ -106,8 +106,11 @@ func Profile(c *context.Context) {
 		count := models.CountUserRepositories(ctxUser.ID, showPrivate)
 		c.Data["Page"] = paginater.New(int(count), setting.UI.User.RepoPagingNum, page, 5)
 	}
-
-	c.HTML(200, PROFILE)
+	if ctxUser.ProhibitLogin == true {
+		c.Handle(404, "ProhibitLogin", err)
+	} else {
+		c.HTML(200, PROFILE)
+	}
 }
 
 func Followers(c *context.Context) {