mirror of
https://github.com/go-gitea/gitea.git
synced 2026-01-04 20:37:55 +00:00
Backport #36058 by @lunny Fix #20390 We should use `ReplacePrimaryEmailAddress` instead of `AdminAddOrSetPrimaryEmailAddress` when modify user's email from admin panel. And also we need a database transaction to keep deletion and insertion succeed at the same time. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>