Reading User Accounts

Reading User Accounts

The read user account operation returns the user account object from the Users content type with the exception of sensitive fields such as Password.

Single User

To read a single user based on its ID, you have to execute the following code snippet:

public async Task GetUsername(EverliveApp app, Guid userId)
{
    var user = await this.App.WorkWith().Users().GetById(this.userId).ExecuteAsync();
    Debug.WriteLine("Username: " + user.Username);
}

Current User

public async Task GetMyUsername(EverliveApp app)
{
    var myUser = await app.WorkWith().Users().GetMe().ExecuteAsync();
    Debug.WriteLine("My Username: " + myUser.Username);
}

Multiple Users

public async void GetAllUsernames(EverliveApp app)
{
    var users = await app.WorkWith().Users().GetAll().ExecuteAsync();
    foreach(var user in users)
    {
        Debug.WriteLine("Username: " + user.Username);
    }
}
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.