openmrs-esm-core

O3 Framework / refetchCurrentUser

Function: refetchCurrentUser()

refetchCurrentUser(username?, password?): Promise<SessionStore>

Defined in: packages/framework/esm-api/src/current-user.ts:204

The refetchCurrentUser function causes a network request to redownload the user. All subscribers to the current user will be notified of the new users once the new version of the user object is downloaded.

Parameters

username?

string

password?

string

Returns

Promise<SessionStore>

The same observable as returned by getCurrentUser.

Example

import { refetchCurrentUser } from '@openmrs/esm-api'
refetchCurrentUser()