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
expireDeletedUserdelete 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) andgitea-sync(services/web/modules/gitea-sync/index.mjs:56). - An expired record is never deleted:
deleterDatastays for good, onlyuserand the IP address are removed. - The user’s personal access tokens are not deleted with the account, see OAuth Access Tokens.
- Mongoose also gives
deleterDataits own_id, which nothing reads.

