Skip to content

SohaUser

Overview

Represents a user. Invalidated users (such as those whose passwords have been changed on another client) are automatically logged out.

Properties

serverID

Use this property to set server id.


Declaration

@property (nonatomic,strong) NSString *serverID;

serverName

Use this property to set server name.


Declaration

@property (nonatomic,strong) NSString *serverName;

characterID

Use this property to set character id.


Declaration

@property (nonatomic,strong) NSString *characterID;

characterName

Use this property to set character level.


Declaration

@property (nonatomic,strong) NSString *characterName;

accessToken

Access token of the current use. Use this property to authentication with SohaGame platform.


Declaration

@property (nonatomic,strong) NSString *accessToken;

userId

The id of the current user.


Declaration

@property (nonatomic,strong) NSString *userId;

userName

The name of the current user.


Declaration

@property (nonatomic,strong) NSString *userName;

userEmail

The email of the current user.


Declaration

@property (nonatomic,strong) NSString *userEmail;

The avatar url of the current user.


Declaration

@property (nonatomic,strong) NSString *avatarImgLink;

new_user

Indicates this user is a new user.


Declaration

@property (nonatomic ,assign) BOOL *new_user;

isPlayNow

Indicates this user logged in via play now.


Declaration

@property (nonatomic ,assign) BOOL *isPlayNow;

isLoggingOut

Indicates this user is logged out.


Declaration

@property (nonatomic ,assign) BOOL *isLoggingOut;

isTestUser

Indicates this user is a test user.


Declaration

@property (nonatomic ,assign) BOOL *isTestUser;

Methods

currentUser

Gets the singleton instance of the SohaUser class.


Declaration

+(SohaUser *)currentUser;

updateInfoWithData

Updates information for the user.


Declaration

- (void)updateInfoWithData:(NSDictionary *)userInfo;

Parameters

userInfo
The infomation of user.

clearData

Clears the current user's data from the cache.


Declaration

- (void)clearData;