summaryrefslogtreecommitdiffstats
path: root/services/user/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/user/user.go')
-rw-r--r--services/user/user.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/user/user.go b/services/user/user.go
index 9dc4f6fe62..4e983eb9f6 100644
--- a/services/user/user.go
+++ b/services/user/user.go
@@ -1,3 +1,4 @@
+// Copyright 2024 The Forgejo Authors. All rights reserved.
// Copyright 2021 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
@@ -208,6 +209,13 @@ func DeleteUser(ctx context.Context, u *user_model.User, purge bool) error {
return err
}
}
+
+ // Delete Federated Users
+ if setting.Federation.Enabled {
+ if err := user_model.DeleteFederatedUser(ctx, u.ID); err != nil {
+ return err
+ }
+ }
}
ctx, committer, err := db.TxContext(ctx)