The user session has been created during the plugin initialization. It should be reset by the developer during the user logout by invoking the “resetDGuserid” method.

For example, when “User A” logs out, the “dg_user_id” does not change. The “dg_user_id” lives in local storage (mobile). To handle multiple identities(Eg:When “User B” logs in) on the same device, y call “resetDGuserid()” on log out. “resetDGuserid()” resets the “dg_user_id”, creates a new “dg_user_id” which will be used for future sessions until “User B” logs out.

Method

resetDGuserid: function(successCallback, errorCallback)

Parameters

successCallback	- Call back method in which the plugin returns the Success messages
errorCallback	  - Call back method in which the plugin returns the Error messages

Example

cordova.plugins.datagran.resetDGuserid(success, failure);