Updating User Accounts

Updating User Accounts

The user account update operation is a data operation that allows you to modify the fields of the user account object stored in the Users content type.

Single User

To update a user of your application, you have to execute the following code snippet:

public async Task UpdateUserById(EverliveApp app, Guid userId, User updateObject)
{
    await app.WorkWith().Users().Update(userId, updateObject).ExecuteAsync();
}

Multiple Users

To update multiple items of your type with a single operation, you have to execute the following code snippet:

public async Task UpdateUsersByFilter(EverliveApp app, string username, string displayName)
{
    UpdateObject updateObject = new UpdateObject();
    updateObject.UpdatedFields.Add(new UpdatedField()    
    {
        FieldName = "DisplayName",
        Value = newDisplayname    
    });
    await app.WorkWith().Users().Update(updateObject).Where(u => u.Username == this.username).ExecuteAsync();
}
Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.