User Module
Updated: 2026-07-17 15:16:39
1. Feature Overview
用户模块(user) is a module for handling audience-related features, primarily used to retrieve various information about the current viewer and set the viewer's nickname.
2. API Method Overview
| API Method | Description |
|---|---|
| getUserInfo | Get current user information |
| isSpecialUserType | Check if the user has a special identity |
| getUserId | Get the current user's userId |
| getUserNick | Get the current user's nickname |
| updateUserNick | Update the current user's nickname |
| getUserAvatar | Get the current user's avatar URL |
| getUserOpenId | Get the current user's WeChat openId |
| getUserUnionId | Get the current user's WeChat unionId |
| getUserActor | Get the current user's title |
| getUserLabels | Get labels associated with the current user |
| needHideUserActor | Check if the user's title should be hidden |
| getUserAuthType | Get the current user's authentication method |
| needRealNameAuth | Check if phone number real-name authentication is required |
| saveRealNameData | Save real-name authentication information |
| getUserSeatInfo | Get the current viewer's cloud seat information |
| getUserSaleInfo | Get the current viewer's follow-up person information |
| getInviteWatchSaleId | Get the invite watch salesperson/distributor ID |
| getInviteWatchInviteSalesId | Get the inviteWatchSaleId of the superior inviter for invite watch |
3. Event Overview
| Event | Description |
|---|---|
| UserEvents.UserInfoChange | User information changed |
| UserEvents.UserSetNick | Any user sets a nickname |
| UserEvents.CurrentUserSetNick | Current user sets a nickname |
| UserEvents.SetNickError | Failed to set nickname |
| UserEvents.CurrentUserKicked | Current user kicked out of the chat room |
