iOS - Access User Info
note
Modules conforming to the Module
interface can access an instance of ModuleDataSource
via the moduleDataSource
property.
Use this instance to retrieve authenticated user information provided by Q2MobileCore
.
User Token
You can access the user's authentication token using:
User Token
let q2UserToken = moduleDataSource?.user?.token
If the user is authenticated in the Q2 system, this token can be used to make
authenticated API calls from your module. :::
User Name
Retrieve the username associated with the authenticated session:
User Name
let q2UserName = moduleDataSource?.user?.username
User Identifier
Get the unique identifier for the authenticated user:
User Identifier
let q2UserIdentifier = moduleDataSource?.user?.identifier