forgejo/services/user
Gusted fb4c42deb2
[BUG] Don't delete inactive emails explicitly
- `user_model.DeleteInactiveEmailAddresses` related code was added in
Gogs as part to delete inactive users, however since then the related
code to delete users has changed and this code now already delete email
addresses of the user, it's therefore not needed anymore to
`DeleteInactiveEmailAddresses`.
- The call to `DeleteInactiveEmailAddresses` can actually cause issues.
As the associated user might not have been deleted, because it
was not older than the specified `olderThan` argument. Therefore causing
a database inconsistency and lead to internal server errors if the user
tries to activate their account.
- Adds unit test to verify correct behavior (fails without this patch).
2024-03-29 17:50:13 +01:00
..
avatar.go Refactor rename user and rename organization (#24052) 2023-05-21 23:13:47 +08:00
block.go [MODERATION] User blocking 2023-11-13 13:58:02 +01:00
block_test.go [MODERATION] User blocking 2023-11-13 13:58:02 +01:00
delete.go [MODERATION] User blocking 2023-11-13 13:58:02 +01:00
user.go [BUG] Don't delete inactive emails explicitly 2024-03-29 17:50:13 +01:00
user_test.go [BUG] Don't delete inactive emails explicitly 2024-03-29 17:50:13 +01:00