Skip to main content

CurrentUser Type

The CurrentUser type is returned by the useCurrentUserInfo hook, and represents the current authenticated DHIS2 user.

PropertyTypeDescription
idstringUnique user identifier.
usernamestringUsername used to log in.
displayNamestringFull display name of the user.
authoritiesstring[]List of user authority codes.
organisationUnitsArray<{id}>Organisation units assigned to the user.
namestring?User's full name (optional).
surnamestring?User's surname (optional).
firstNamestring?User's first name (optional).
emailstring?User email address.
emailVerifiedboolean?Indicates if the email is verified.
introductionstring?Short profile introduction.
birthdaystring?User's date of birth.
nationalitystring?User’s nationality.
educationstring?User’s education background.
interestsstring?User’s interests.
whatsAppstring?WhatsApp contact.
facebookMessengerstring?Facebook Messenger contact.
skypestring?Skype contact.
telegramstring?Telegram contact.
twitterstring?Twitter handle.
employerstring?Name of the employer.
languagesstring?Spoken languages.
genderstring?Gender of the user.
jobTitlestring?User’s job title.
createdstring?ISO timestamp when the user was created.
lastUpdatedstring?ISO timestamp of last update.
accessobject?Access permissions for the user.
settingsobject?User interface and system preference settings.
userGroupsArray<{id}>?Groups the user belongs to.
userRolesArray<{id}>?User roles assigned.
dataViewOrganisationUnitsArray<{id}>?Org units allowed for data view access.
teiSearchOrganisationUnitsArray<{id}>?Org units used for TEI searching.
programsstring[]?Programs assigned to the user.
dataSetsstring[]?Data sets the user has access to.
patTokensArray<{id}>?Personal access tokens.
attributeValuesany[]?Additional attribute values.
favoritesany[]?User favorites stored in DHIS2.
translationsany[]?Translated fields for the user.
twoFactorTypestring?Type of two-factor authentication enabled.