diff options
author | techknowlogick <hello@techknowlogick.com> | 2023-09-05 13:56:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 17:56:21 +0000 |
commit | 084eacb5d42f1ed2520442a4bbc91bb70c9759e1 (patch) | |
tree | 8c13c63ef643141038f440a96d2db649dcd7f3c8 | |
parent | 5f7fa27a447fbbc978283009e1913aee0aab2cfc (diff) | |
download | gitea-084eacb5d42f1ed2520442a4bbc91bb70c9759e1.tar.gz gitea-084eacb5d42f1ed2520442a4bbc91bb70c9759e1.zip |
fetch emails of currently displayed user on admin page (#26918)
Currently, this fetches the emails from the user viewing the page. This
PR changes it to show the emails from the user whose page it is.
-rw-r--r-- | routers/web/admin/users.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/admin/users.go b/routers/web/admin/users.go index 61df49b85b..c83d652c3d 100644 --- a/routers/web/admin/users.go +++ b/routers/web/admin/users.go @@ -281,7 +281,7 @@ func ViewUser(ctx *context.Context) { ctx.Data["Repos"] = repos ctx.Data["ReposTotal"] = int(count) - emails, err := user_model.GetEmailAddresses(ctx.Doer.ID) + emails, err := user_model.GetEmailAddresses(u.ID) if err != nil { ctx.ServerError("GetEmailAddresses", err) return |