togetheruser - TogetherGames/Public-Corona-Lua GitHub Wiki
Together::TogetherUser
The TogetherUser class represents a Together User.
number UserID
The ID of the User.
string UserGuid
The Guid assigned to the user that should be cached on the device. When the UserGuid is passed while sending the 'loginuser' message to the server, the User assigned the UserGuid will be returned.
number ActiveUserAccountTypeID
The type of account the User has. This member represents the last registration performed by the user. 0=Anonymous, 1=Facebook, 2=Twitter, 3=GooglePlus, 4=GameCenter, 5=Custom
string Name
The name of the User. For anonymous users, it will be in the format 'user_###' where ### equals the UserID of the User. For registered users, this will be equal to the Users name from some external social network. When a User registers via Facebook, Name will be set to their Facebook name.
string Username
The username for the User. It will be in the format 'user_###' where ### equals the UserID of the User. This value is generated when a new User logs into a together game for the first. This value can not be changed at this time.
string Email
The email of the User.
boolean Active
A boolean indicating whether the User is active.
boolean Anonymous
A boolean indicating whether the User has registered yet.
PropertyCollection Properties
A property collection containing all custom properties for the User.
TogetherFacebookUser FacebookUser
An instance of a FacebookUser object containing facebook user information. If FacebookUser is non nil, then the User has performed a Facebook registration at some time.
TogetherCustomUser CustomUser
An instance of a CustomUser object containing custom user information. If CustomUser is non nil, then the User has performed a Custom registration at some time.
TogetherClientUserProfile ClientUserProfile
An instance of a ClientUserProfile object containing client specific properties for the User.
TogetherGameUserProfile GameUserProfile
An instance of a GameUserProfile object containing game specific properties for the User.
UserItemManager UserItemManager
An instance of a UserItemManager object so developers can have quick access to User's inventory of Items.
UserAchievementManager UserAchievementManager
An instance of a UserAchievementManager object so developers can have quick access to a User's UserAchievements.
UserGameManager UserGameManager
An instance of a UserGameManager object so developers can have quick access to the list of games a User has played.
Returns the visual display name for the User.
Returns string
TogetherUser:GetViewName( )
Gets the FacebookUser associated to this Together User if it exists, otherwise this will create and assign an empty FacebookUser, then return it
Returns TogetherFacebookUser
TogetherUser:GetTogetherFacebookUser( )
Gets the CustomUSer associated to this Together User if it exists, otherwise this will create and assign an empty CustomUser, then return it
Returns TogetherCustomUser
TogetherUser:GetTogetherCustomUser( )
Returns a boolean indicating whether the User has registered via Facebook.
Returns boolean
TogetherUser:IsFacebookRegistered( )
Returns a boolean indicating whether the User has registered via Custom registration.
Returns boolean
TogetherUser:IsCustomRegistered( )
Gets all the User's details. Upon success, this will automatically update the internal data. The UserID member is passed along to the server when this method is called.
Returns void
TogetherUser:GetDetails( callbackFunc )
function callbackFunc
The function to call upon completion.
--------------------------------------------------------------------------------Modifies a User. Upon success, this will automatically update the internal data. The Properties, ClientUserProfile properties, and GameUserProfile properties are sent to the server when this method is called.
Returns void
TogetherUser:Modify( callbackFunc )
function callbackFunc
The function to call upon completion.
--------------------------------------------------------------------------------