User

Object defines a user.

userEmpty#200250ba id:int = User;
userSelf#720535ec id:int first_name:string last_name:string phone:string photo:UserProfilePhoto status:UserStatus inactive:Bool = User;
userContact#f2fb8319 id:int first_name:string last_name:string access_hash:long phone:string photo:UserProfilePhoto status:UserStatus = User;
userRequest#22e8ceb0 id:int first_name:string last_name:string access_hash:long phone:string photo:UserProfilePhoto status:UserStatus = User;
userForeign#5214c89d id:int first_name:string last_name:string access_hash:long photo:UserProfilePhoto status:UserStatus = User;
userDeleted#b29ad7cc id:int first_name:string last_name:string = User;

---functions---

account.updateProfile#f0888d68 first_name:string last_name:string = User;

Constructors

Constructor Description
userEmpty Empty constructor, non-existent user.
user Indicates info about a certain user.

Unless specified otherwise, when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).

See here ยป for an implementation of the logic to use when updating the local user peer database.

Methods

Method Description
account.updateProfile Updates user profile.
account.updateUsername Changes username for the current user.
account.changePhone Change the phone number of the current account
contacts.importContactToken Obtain user info from a temporary profile link.