# User account

After creating the user account you can change or update the user information.

# Update User Profile

Here you can update user profile such as displayName, location, timezoneUtcOffset, avatarUrl, language. First we need to create a Profile object to set our new values and then we use UpdateAccount class and UpdateProfile to update our user profile

using Hicore;
using Hicore.Authentications;
using Hicore.Reference;

private void Start(){

    Profile profile = new Profile();

    profile.DisplayName = "Hicore";
    profile.Location = true;
    profile.TimezoneUtcOffset = true;
    profile.AvatarUrl = "www.hicore.dev/avatar";
    profile.Language = new LanguageCode().English;

    client.UpdateAccount.UserProfile(profile, (res) =>
      {
        Debug.Log($"result type = {res.Type} result message = {res.Message} result code = {res.Code}");
      });
}

You can update one or more profile value.

# Update Username

To add or update username we use Username to update username

    client.UpdateAccount.Username("Jupiter", (res) =>{});

# Update Email

To add or update email we use Email to update email address

    client.UpdateAccount.Email("jupiter@server.com", (res) =>{});

# Change Password

To change password we can use Password to change password

    client.UpdateAccount.Password("oldPassword", "newPassword", (res) =>{});

# Update User XP For Level

User level up is based on XP. To updating user XP progress first we need to add some ranges in the dashboard and base on that parameters we update user Level. For increasing user XP we use UpdateLevelXp. After sending the request to the server, the server will check and return level and XP numbers

    client.UpdateAccount.UpdateLevelXp(10, (res) =>{

        Debug.Log(res.Message);
        Debug.Log(res.Data);
        Debug.Log(res.Code);
    });

# Update User Skill For Rank

User rank is based on skill. Like XP progress first we need to add some skill ranges in the dashboard and base on that parameters we update user Rank. For increasing and decreasing user skill we use UpdateRankSkill. For decreasing user skill just put minus with number. After that, the server will check and return rank and skill numbers

    client.UpdateAccount.UpdateRankSkill(10, (res) =>{

        Debug.Log(res.Message);
        Debug.Log(res.Data);
        Debug.Log(res.Code);
    });