User preferences — per-user language, timezone, skin (+ where theming lives)
Grounded against origin/releases/7.0 (MibServer3 UserViewData, Preference/ConfigurationRepository,
BaseController, DateTimeFieldHelper).
MIB has per-user preferences — distinct from global theming. Preferences follow the logged-in user
(their language, timezone, skin, and any custom key/value); theming rebrands the whole CMS for everyone. This doc is
the preferences side; the global-look side is already recipe.configure-theming (CSS vars + logo/welcome image).
The two first-class prefs: Language & TimeZone
Every user carries a Language and a TimeZone, surfaced directly on Context.User
(UserViewData.Language, :17; UserViewData.TimeZone/TimeZoneName, :37/:40) — and the platform applies them
automatically:
Languagedrives{DICT:Section/Key}resolution (building-block.i18n-dictionary) — which translation the user sees.TimeZonedrives date/time rendering, including audit timestamps and list date columns (DateTimeFieldHelper.cs:9wraps values with the user's zone + language). A wrong/mismatched zone shows confusing timestamps.
Read them wherever your component/seam has Context.User — no extra plumbing.
The extensible bag: the Preferences dictionary
Beyond those two, a user has a Preferences map (UserViewData.Preferences, Dictionary<string,string>, :23),
stored in MIB3UX_PREFERENCES + MIB3UX_PREFERENCES_VALUES ({ USER_ID, PREFERENCE_ID → key, VALUE },
Preference.cs). From 7.1 the values table has a primary key on ID and an index on (USER_ID, PREFERENCE_ID),
so reading a user's preferences and saving the menu history no longer scan it
(MEDIAIBOX-12387). The editable keys are declared in
ConfigurationRepository.GetEditablePreferences():
interface_language— enum (e.g.pt-br/en-us). Not the language the CMS uses: from 7.0.4 that is the user's profile language, carried by the session (see Localization — per-user language). Up to 7.0.3 this preference won over the profile language.interface_skin— enum (e.g.mib); read byBaseController.GetSkinPreference()→ the?skin=the shell loads.
Critical gotcha: the Preferences dictionary is populated but "currently never read" by core flows
(IUserWorkflow.cs:17-18). So a customization that wants a per-user setting must read it explicitly — it is not
auto-applied like Language/TimeZone.
Read a preference from a customization
// Language / timezone are first-class and already applied — just read them:
var lang = Context.User.Language; // e.g. "en-us" (drives {DICT:} resolution)
var tz = Context.User.TimeZone; // e.g. "America/Sao_Paulo" (drives date rendering)
// Any other per-user setting lives in the Preferences bag — core does NOT auto-read it:
if (Context.User.Preferences.TryGetValue("interface_skin", out var skin))
// ... branch on the user's chosen skin / custom preference
Setting a preference is a user/account concern (the account page persists Language/TimeZone to ADM_USERS; skin /
interface_language go through PreferenceRepository into MIB3UX_PREFERENCES_VALUES). A customization typically
reads prefs to adapt behavior, not writes them.
Global theming (the other half — already catalogued)
Rebranding the whole CMS is not a per-user preference — it's recipe.configure-theming: override the :root CSS
custom variables (--color-highlight, --color-title, --color-primary-background, …) and point logo/welcome image at
custom assets via FrontEnd Server env vars — no code. Per-page hooks (CUSTOM_JAVASCRIPT, CUSTOM_CONFIGURATION)
are separate config keys (config-key.custom-javascript / config-key.custom-configuration) — page injection, not
theming, and CUSTOM_JAVASCRIPT runs unsandboxed (no CSP), so reserve it for trusted internal use.
Gotchas (grounded)
- The
Preferencesbag is not auto-applied — core populates it but doesn't read it (IUserWorkflow.cs:17-18); your customization mustTryGetValueexplicitly.Language/TimeZoneare the exception (first-class, applied). - TimeZone affects audit & list dates — it's a display-layer offset (stored dates are UTC); a bad zone misleads.
interface_skinis enum-bounded — available skins come fromMibCmsFrontEndServerBaseConfig(mibconfigskins), a deploy-time list — you can't add a skin via the preference API. Runtime rebrand =recipe.configure-theming.- Language pref ↔ {DICT:} — the user's language selects the dictionary layer; a missing translation falls back per
building-block.i18n-dictionary's resolution order, it doesn't error.
Discover
mib get building-block.user-preferences · mib get recipe.read-user-preference · global rebrand:
mib get recipe.configure-theming · translations: mib get building-block.i18n-dictionary.