diff options
author | Unknwon <u@gogs.io> | 2016-01-14 21:07:17 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-01-14 21:07:17 +0800 |
commit | f75b5f42870b03ed366956f6b83ca21a34dad810 (patch) | |
tree | 9c9399b12699b072179ec16fe2e7343e2a51b77e /routers | |
parent | a72f57374d3357a6e591f24926a0d551954ccbc5 (diff) | |
parent | 40413c5c6c1204a465c8be27e72e49ea9c2554cb (diff) | |
download | gitea-f75b5f42870b03ed366956f6b83ca21a34dad810.tar.gz gitea-f75b5f42870b03ed366956f6b83ca21a34dad810.zip |
Merge pull request #2383 from exmex/develop
Added organization display on profile
Diffstat (limited to 'routers')
-rw-r--r-- | routers/user/profile.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/user/profile.go b/routers/user/profile.go index 915cf86c61..3a25363818 100644 --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -74,6 +74,13 @@ func Profile(ctx *middleware.Context) { ctx.Data["Title"] = u.DisplayName() ctx.Data["PageIsUserProfile"] = true ctx.Data["Owner"] = u + + orgs, err := models.GetOwnedOrgsByUserIDDesc(u.Id, "updated") + if err != nil { + ctx.Handle(500, "GetOwnedOrgsByUserIDDesc", err) + return + } + ctx.Data["Orgs"] = orgs tab := ctx.Query("tab") ctx.Data["TabName"] = tab |