mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-24 08:57:03 -05:00
Add warn log when deleting inactive users (#32318)
Add log for the problem #31480 (cherry picked from commit a264c46fb04112c5ec2c1b2acd523a2e4450da40) Conflicts: - services/user/user.go Resolved by manually adding the log line.
This commit is contained in:
parent
8c79008d6f
commit
261c0a95b4
1 changed files with 1 additions and 0 deletions
|
@ -306,6 +306,7 @@ func DeleteInactiveUsers(ctx context.Context, olderThan time.Duration) error {
|
|||
// Ignore users that were set inactive by admin.
|
||||
if models.IsErrUserOwnRepos(err) || models.IsErrUserHasOrgs(err) ||
|
||||
models.IsErrUserOwnPackages(err) || models.IsErrDeleteLastAdminUser(err) {
|
||||
log.Warn("Inactive user %q has repositories, organizations or packages, skipping deletion: %v", u.Name, err)
|
||||
continue
|
||||
}
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue