khis_username | R Documentation |
This function returns the username from the configured credentials. If an auth object is provided, it retrieves the username from that object. Otherwise, it retrieves the username from the global auth object.
khis_username(auth = NULL)
auth |
(Optional) An auth object. If not provided, the function will retrieve the username from the global auth credentials. |
The username as a string, or NULL
if no credentials are available.
Other credential functions:
khis_base_url()
,
khis_cred()
,
khis_cred_clear()
,
khis_display_name()
,
khis_has_cred()
## Not run:
# Set the credentials using global .auth object
khis_cred(username = 'DHIS2 username',
password = 'DHIS2 password',
base_url = 'https://dhis2-instance/api')
# View the username (expect 'DHIS2 username')
khis_username()
# Clear credentials
khis_cred_clear()
# View the username (expect 'NULL')
khis_username()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.