Skip to content

Commit 084eacb

Browse files
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.
1 parent 5f7fa27 commit 084eacb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/admin/users.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func ViewUser(ctx *context.Context) {
281281
ctx.Data["Repos"] = repos
282282
ctx.Data["ReposTotal"] = int(count)
283283

284-
emails, err := user_model.GetEmailAddresses(ctx.Doer.ID)
284+
emails, err := user_model.GetEmailAddresses(u.ID)
285285
if err != nil {
286286
ctx.ServerError("GetEmailAddresses", err)
287287
return

0 commit comments

Comments
 (0)