aboutsummaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-10-23 09:28:28 +0800
committerGitHub <noreply@github.com>2024-10-23 09:28:28 +0800
commita264c46fb04112c5ec2c1b2acd523a2e4450da40 (patch)
treeb11fb228dd37a492e3793084c068b731e659d83f /services
parent9206fbb55fd28f21720072fce6a36cc22277934c (diff)
downloadgitea-a264c46fb04112c5ec2c1b2acd523a2e4450da40.tar.gz
gitea-a264c46fb04112c5ec2c1b2acd523a2e4450da40.zip
Add warn log when deleting inactive users (#32318)
Add log for the problem #31480
Diffstat (limited to 'services')
-rw-r--r--services/user/user.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/services/user/user.go b/services/user/user.go
index 9aded62a51..7855dbb78b 100644
--- a/services/user/user.go
+++ b/services/user/user.go
@@ -289,6 +289,7 @@ func DeleteInactiveUsers(ctx context.Context, olderThan time.Duration) error {
if err = DeleteUser(ctx, u, false); err != nil {
// Ignore inactive users that were ever active but then were set inactive by admin
if models.IsErrUserOwnRepos(err) || models.IsErrUserHasOrgs(err) || models.IsErrUserOwnPackages(err) {
+ log.Warn("Inactive user %q has repositories, organizations or packages, skipping deletion: %v", u.Name, err)
continue
}
select {