mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-24 20:32:43 +08:00
Add warn log when deleting inactive users (#32318)
Add log for the problem #31480
This commit is contained in:
parent
9206fbb55f
commit
a264c46fb0
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user