1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-17 23:54:25 +00:00
gitea/services/user
Giteabot 98a81bef17
Refactor DeleteInactiveUsers, fix bug and add tests (#30206) (#30222)
Backport #30206 by wxiaoguang

1. check `IsActive` before calling `IsLastAdminUser`.
2. Fix some comments and error messages.
3. Don't `return err` if "removing file" fails in `DeleteUser`.
4. Remove incorrect `DeleteInactiveEmailAddresses`. Active users could
also have inactive emails, and inactive emails do not support
"olderThan"
5. Add tests

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-04-01 12:58:46 +08:00
..
avatar.go Unify user update methods (#28733) 2024-02-04 13:29:09 +00:00
block_test.go Add user blocking (#29028) 2024-03-04 08:16:03 +00:00
block.go Add user blocking (#29028) 2024-03-04 08:16:03 +00:00
delete.go Add user blocking (#29028) 2024-03-04 08:16:03 +00:00
email_test.go Skip email domain check when admins edit user emails (#29609) 2024-03-05 16:51:56 +00:00
email.go Skip email domain check when admins edit user emails (#29609) 2024-03-05 16:51:56 +00:00
update_test.go Unify user update methods (#28733) 2024-02-04 13:29:09 +00:00
update.go Unify password changing and invalidate auth tokens (#27625) 2024-02-04 14:05:26 +00:00
user_test.go Refactor DeleteInactiveUsers, fix bug and add tests (#30206) (#30222) 2024-04-01 12:58:46 +08:00
user.go Refactor DeleteInactiveUsers, fix bug and add tests (#30206) (#30222) 2024-04-01 12:58:46 +08:00