mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 05:36:19 +01: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
d77096071d
commit
9c6f2a132d
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