The Telerik Platform product is retired.Learn more

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 void getUsername(EverliveApp app, UUID userId) {
    User user = app.workWith().users(User.class).getById(userId).executeSync();
    Log.i("App_name", "Username: " + user.getUsername());

Note: instead of the Id of the user, you can also use "me" here. This will give you the data for the currently logged in user. Example:

public void getMyUsername(EverliveApp app) {
    User myUser = app.workWith().users(User.class).getMe().executeSync();
    Log.i("App_name", "My Username: " + myUser.getUsername());

Multiple Users

public void getAllUsernames(EverliveApp app) {
    RequestResult<ArrayList<User>> getUsersRequestResult = app.workWith().users(User.class).getAll().executeSync();
    if (getUsersRequestResult.getSuccess()) {
        for (User user : users) {
            Log.i("App_name", "Username: " + user.Username);

See Also

Contact us: +1-888-365-2779
Copyright © 2016-2018, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.