getPreviousUser

open fun getPreviousUser(): String?

In a multiple user scenario, when a new user starts using the application on a mobile device, it might have pending requests in the local database that need to be uploaded using the previous user's identity. This function can be called before {@link com.sap.cloud.mobile.kotlin.odata.OfflineDataService#open() OfflineDataService.open} is called to determine whether special action is needed. Calling {@link com.sap.cloud.mobile.kotlin.odata.OfflineDataService#open() OfflineDataService.open} when there is a known previous user might result in {@link com.sap.cloud.mobile.kotlin.odata.OfflineDataService#upload(com.sap.cloud.mobile.kotlin.odata.StringList?, com.sap.cloud.mobile.kotlin.odata.SyncOptions?) OfflineDataService.upload} and/or {@link com.sap.cloud.mobile.kotlin.odata.OfflineDataService#download(com.sap.cloud.mobile.kotlin.odata.StringList?, com.sap.cloud.mobile.kotlin.odata.SyncOptions?) OfflineDataService.download} being called by {@link com.sap.cloud.mobile.kotlin.odata.OfflineDataService#open() OfflineDataService.open}.

Return

(nullable) the previous user of the local database (if available).