mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 01:58:56 +00:00 
			
		
		
		
	Show the username as a fallback on feeds if full name is blank (#10438)
Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
		| @@ -739,9 +739,11 @@ func (u *User) DisplayName() string { | ||||
| // GetDisplayName returns full name if it's not empty and DEFAULT_SHOW_FULL_NAME is set, | ||||
| // returns username otherwise. | ||||
| func (u *User) GetDisplayName() string { | ||||
| 	trimmed := strings.TrimSpace(u.FullName) | ||||
| 	if len(trimmed) > 0 && setting.UI.DefaultShowFullName { | ||||
| 		return trimmed | ||||
| 	if setting.UI.DefaultShowFullName { | ||||
| 		trimmed := strings.TrimSpace(u.FullName) | ||||
| 		if len(trimmed) > 0 { | ||||
| 			return trimmed | ||||
| 		} | ||||
| 	} | ||||
| 	return u.Name | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user