setExternalUserId Method
The OneSignal SDK setExternalUserId method should be called when the user logs into the app/site and within the callback of the setEmail and setSMSNumber methods to link the records together.
Disassociating the External User Id
External User Ids can be disassociated from the current device’ssubscription_id record using the OneSignal SDK removeExternalUserId method.