English
English
简体中文
Contact Us
Register
Log In
layoutIndex

User Account Management

Last Updated on : 2022-03-03 06:40:52download

Tuya Smart Residence App SDK supports the user accounts that are registered with email addresses.

Functional description

In this module, the TuyaSmartUser object is frequently called. This object is a singleton that stores all information about the current user including login and registration methods. The following table describes the data model of the object.

Field Type Description
userName NSString The username. If an account is registered with an email address, the username is an email address.
headIconUrl NSString The URL of the user avatar.
nickname NSString The nickname of the user.
phoneNumber NSString The mobile phone number of the user.
email NSString The email address of the user.
countryCode NSString The country code. Examples:
  • 86: China
  • 1: United States
regionCode NSString The availability zone to which the current account belongs. Examples:
  • AY: China
  • AZ: America
  • EU: Europe
timezoneId NSString The time zone ID. Example: Asia/Shanghai.
tempUnit NSInteger The temperature unit. Valid values:
  • 1: temperature in Celsius (°C)
  • 2: temperature in Fahrenheit (°F)
isLogin BOOL The login status.
regFrom TYRegType The type of registration.

Account roles

Site members can be assigned the following roles:

  • Owner: granted all permissions on specific sites and devices.
  • Administrator: granted most permissions on specific sites and devices.
  • Member: only authorized to use devices but cannot manage common members.

Their permission levels are sorted in the following descending order: owner > administrator > member.

This section contains the following topics to help you quickly understand related concepts and how-to guides: