mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	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.
This commit is contained in:
		@@ -281,7 +281,7 @@ func ViewUser(ctx *context.Context) {
 | 
				
			|||||||
	ctx.Data["Repos"] = repos
 | 
						ctx.Data["Repos"] = repos
 | 
				
			||||||
	ctx.Data["ReposTotal"] = int(count)
 | 
						ctx.Data["ReposTotal"] = int(count)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	emails, err := user_model.GetEmailAddresses(ctx.Doer.ID)
 | 
						emails, err := user_model.GetEmailAddresses(u.ID)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		ctx.ServerError("GetEmailAddresses", err)
 | 
							ctx.ServerError("GetEmailAddresses", err)
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user