gitea/models/user
Giteabot 25e409e025
Return default avatar url when user id is zero rather than updating database (#34094) (#34095)
Backport #34094 by @lunny

When visit commit list, it would update the user avatar even if id = 0,
which was unnecessary operations. This PR returned default avatar for
the git only user avatar rendering who's user id is zero.

```log
database duration=0.0005s db.sql="UPDATE `user` SET `avatar` = ?, `updated_unix` = ? WHERE `id`=?"
database duration=0.0007s db.sql="UPDATE `user` SET `avatar` = ?, `updated_unix` = ? WHERE `id`=?"
...
```

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-02 09:37:17 +08:00
..
avatar_test.go Fix user avatar (#33439) 2025-01-30 17:11:13 +08:00
avatar.go Return default avatar url when user id is zero rather than updating database (#34094) (#34095) 2025-04-02 09:37:17 +08:00
badge.go
block.go
email_address_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
email_address.go Support for email addresses containing uppercase characters when activating user account (#32998) (#33001) 2024-12-27 11:41:41 +00:00
error.go
external_login_user.go
follow_test.go
follow.go
list.go
main_test.go
must_change_password.go
openid_test.go
openid.go
redirect_test.go
redirect.go
search.go
setting_keys.go
setting_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
setting.go
user_system_test.go Fix user avatar (#33439) 2025-01-30 17:11:13 +08:00
user_system.go Fix user avatar (#33439) 2025-01-30 17:11:13 +08:00
user_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
user_update.go
user.go Support for email addresses containing uppercase characters when activating user account (#32998) (#33001) 2024-12-27 11:41:41 +00:00