users holds one document per account. It stores login data, the profile, editor settings, features and activity. The schema is services/web/app/src/models/User.mjs; most writes go through services/web/app/src/Features/User/UserUpdater.mjs. In the Source column, User.mjs:N is a line of that schema, other bare file names are under services/web/app/src/Features/, and modules/... is under services/web/. Line numbers are from server-pro at the time of writing.
Core Identity & Authentication
Field
Type
Meaning
Source
_id
ObjectId
Id of the user. Other collections point here with user_id, owner_ref and similar fields.
MongoDB
email
String
Primary email. Unique, also case-insensitively (see Indexes).
User.mjs:26
emails
Array of Object
All addresses of the account. The primary one is the entry equal to email.
User.mjs:27
emails.email
String
The address.
User.mjs:29
emails.reversedHostname
String
Domain of the address, reversed (moc.elpmaxe). Set when the address is added.
When the address was first confirmed (a later confirmation keeps the earlier date). The LDAP, SAML and OIDC modules set emails.0.confirmedAt when they create an account.
bcrypt hash of the local password. Missing for accounts without a password: LDAP and SAML logins unset it, and the migration 20260511150000_reset_hardcoded_admin_password unsets a known default password.
createdAt, enrolledAt, secretEncrypted. In the schema only: CE core and our modules do not use it.
User.mjs:239-243
Account Status & Lifecycle
Field
Type
Meaning
Source
signUpDate
Date
When the account was created.
User.mjs:75
suspended
Boolean
true when an admin disabled the account. UserUpdater.suspendUser sets it and ends the sessions; the admin-tools module calls it and can set it back. Every entry point that is not behind a session (tokens, signed links, websockets, webhooks) must check it.
Last time the user confirmed that the primary email is still theirs, or changed the primary email. Only overleaf.com (saas) checks it: when it is too old, the project list redirects to the primary email check page.
Required. Id used for analytics events. UserCreator refuses to create a user without it; the registration paths and the LDAP, SAML and OIDC modules pass a random UUID (UserRegistrationHandler.mjs:103, modules/login-register/app/src/RegisterController.mjs:127). The migrations 20260424120000 and 20260616070000_back_fill_users_analyticsId filled it from _id for old accounts.
User.mjs:246, UserCreator.mjs:57-58
onboardingEmailSentAt
Date
When the onboarding email was sent. The email is only scheduled when the saas feature is on, so CE does not set it.
In the schema only: CE core and our modules do not use them.
User.mjs:87, :234, :231
overleaf
Object
id, accessToken, refreshToken of a linked overleaf.com v1 account. overleaf.id has a unique index; nothing in CE writes these.
User.mjs:230-234
Login & Activity Tracking
Field
Type
Meaning
Source
lastLoginIp
String
IP of the last login.
User.mjs:85, AuthenticationController.mjs:381
loginCount
Number
Number of successful logins.
User.mjs:88, AuthenticationController.mjs:623
lastLoggedIn
Date
Time of the last successful login.
User.mjs:84, AuthenticationController.mjs:622
loginEpoch
Number
Lock for logins: every login attempt increases it and only updates the document when it still has the value it read, so two parallel logins cannot both pass. The LDAP, SAML and OIDC modules do the same.
Reference manager settings: enabled (default true), groups (array of { id }), disablePersonalLibrary.
User.mjs:10-22, :114-116
Feature Flags & Limits (features)
features is the result of a computation, not something to edit by hand. FeaturesUpdater starts from Settings.defaultFeatures, merges every featuresOverrides entry that has not expired, and writes the result with featuresUpdatedAt (FeaturesUpdater.mjs:220-300, UserFeaturesUpdater.mjs:10-24). The production image sets collaborators, dropbox, versioning, compileTimeout, compileGroup, trackChanges and references as defaults (server-ce/config/settings.js:301-309); the other keys stay unset.In Ayakaleaf Pro the admin panel turns features off per user. The admin-tools module stores them as a featuresOverrides entry with note: 'admin-panel' (modules/admin-tools/app/src/AdminFeatures.mjs:13-30), and the instance-features module treats an unset key as on (modules/instance-features/app/src/UserFeatures.mjs:12-14).
Field
Type
Meaning
Source
features.collaborators
Number
Maximum collaborators per project, -1 = unlimited.
Dropbox sync, GitHub, GitLab and Gitea Sync, and Git access. Checked by those modules, see requireUserFeature. gitlab and gitea (from v6.3.4) have no default: they stay unset, which counts as on, until an administrator turns them off on the Features tab. The migration 20230817081910_back_fill_gitBridge_feature_server_pro set gitBridge: true for all users.
User.mjs:127-131
features.compileTimeout
Number
Compile timeout in seconds. COMPILE_TIMEOUT sets the default.
User.mjs:132
features.compileGroup
String
Compile group, for example standard.
User.mjs:136
features.references
Boolean
Deprecated. For older accounts it still turns on referencesSearch and mendeley.
User.mjs:140, ProjectEditorHandler.mjs:72-77
features.trackChanges
Boolean
Track changes. The track-changes module checks it on the project owner.
Switches for reference search, the symbol palette and offline mode.
User.mjs:151-163
features.aiUsageQuota
String
AI usage tier. Default basic.
User.mjs:159
featuresOverrides
Array of Object
Per-user changes to the defaults. Each entry has createdAt, expiresAt (ignored after this date), note and features (same keys as above, plus templates).
User.mjs:165-196, UserFeaturesUpdater.mjs:45-48
featuresUpdatedAt
Date
When features was last computed.
User.mjs:197
featuresEpoch
String
Copy of Settings.featuresEpoch at the last computation, used to refresh old accounts.
User.mjs:198, FeaturesUpdater.mjs:34-36
The AI assistant and the error assistant are not a features key. They follow the instance AI settings and aiFeatures.enabled, see below.
Integrations
Field
Type
Meaning
Source
aiFeatures.enabled
Boolean
false turns the AI assistant and the error assistant off for this user. Default true.
Encrypted credentials of the linked reference manager, written by the tpr-webmodule module ({ encrypted } for Mendeley, { apiKeyEncrypted } for Zotero). Unset when unlinked.
Dropbox account id. Not in the schema: the dropbox module writes it directly. Unique, so one Dropbox account links to one user. Core uses it to find the users to sync.
Encrypted Dropbox refresh token. Not in the schema, written by the dropbox module. The whole dropbox object is unset on unlink.
DropboxHandler.mjs:111, :181
dropbox.cursor
String
Dropbox list_folder cursor of the user’s app folder, so the next pull only reads newer changes. Not in the schema: written by third-party-datastore, only while the user is still linked to the same Dropbox account.
This account was created on an older version. It still has fields that are no longer in the schema and that nothing reads: staffAccess, ace.enableNewEditor, features.aiErrorAssistant, aiErrorAssistant and writefull.enabled (now writefull.initialized). ace.breadcrumbs now defaults to false.