Skip to main content
deletedUsers keeps a user account after it is deleted: one document per deleted account, with a copy of the whole user document and who deleted it. Web writes it in services/web/app/src/Features/User/UserDeleter.mjs; the schema is services/web/app/src/models/DeletedUser.mjs. When the hard deletion delay has passed, the expiry removes the copy of the user, but the record with deleterData stays. Deleting a user also deletes the projects the user owns; they go to Deleted Projects with the reason account-deletion.

Fields

Who Writes It

Who Reads It

Indexes

Migrations are in tools/migrations/. The index name says deleteUserId, but the key is deletedUserId.

Notes

  • Modules that listen to expireDeletedUser delete their own data of the user: dropbox (services/web/modules/dropbox/index.mjs:62), github-sync (services/web/modules/github-sync/index.mjs:66), gitlab-sync (services/web/modules/gitlab-sync/index.mjs:56) and gitea-sync (services/web/modules/gitea-sync/index.mjs:56).
  • An expired record is never deleted: deleterData stays for good, only user and the IP address are removed.
  • The user’s personal access tokens are not deleted with the account, see OAuth Access Tokens.
  • Mongoose also gives deleterData its own _id, which nothing reads.
Last modified on November 14, 2026