[PR #1131] [CLOSED] Fix random avatar begin regenerated on every page refresh #15779

Closed
opened 2025-11-02 11:54:23 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1131
Author: @andreynering
Created: 3/7/2017
Status: Closed

Base: masterHead: fix-ramdom-avatar-always-being-regenerating


📝 Commits (1)

  • a54cd82 Fix ramdom avatar begin regenerated on every page refresh

📊 Changes

1 file changed (+0 additions, -3 deletions)

View changed files

📝 models/user.go (+0 -3)

📄 Description

See this line: 848293671b/models/user.go (L335)

This line was always returning true because u.CustomAvatarPath() uses a email hash to generate the avatar path, but it was actually generated and served by the user ID.

Using hash on all cases is more consistent and fixes the issue.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/1131 **Author:** [@andreynering](https://github.com/andreynering) **Created:** 3/7/2017 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-ramdom-avatar-always-being-regenerating` --- ### 📝 Commits (1) - [`a54cd82`](https://github.com/go-gitea/gitea/commit/a54cd82d7ffac0db78ccc45bdb3ad427346da2f2) Fix ramdom avatar begin regenerated on every page refresh ### 📊 Changes **1 file changed** (+0 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `models/user.go` (+0 -3) </details> ### 📄 Description See this line: https://github.com/go-gitea/gitea/blob/848293671b5d9c31ce3eb9ad8a1f130edd0ee7c5/models/user.go#L335 This line was always returning true because `u.CustomAvatarPath()` uses a email hash to generate the avatar path, but it was actually generated and served by the user ID. Using hash on all cases is more consistent and fixes the issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:54:23 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15779