This function returns the display name from the configured profile in the provided
auth object. If auth
is not provided, it falls back to the global auth credentials.
See also
Other credential functions:
khis_base_url()
,
khis_cred()
,
khis_cred_clear()
,
khis_has_cred()
,
khis_username()
Examples
if (FALSE) { # \dontrun{
# Set the credentials using global .auth object
khis_cred(username = 'DHIS2 username',
password = 'DHIS2 password',
base_url = 'https://dhis2-instance/api')
# Retrieve the display name from the global .auth profile
khis_display_name()
# Clear credentials
khis_cred_clear()
# Retrieve the display name again (expect 'NULL')
khis_display_name()
} # }