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 the user account of the currently logged in user, employ the fetchWithAccessToken method, passing the user's access token.

[EVUser fetchWithAccessToken:@"your-access-token" block:^(EVUser *user, NSError *error) {
    if(error == nil){
        // the result contains the user account
    } else {
        // handle the server error
    }
}];

To read a single user account based on its ID, base your code on the following snippet:

[EVUser fetchUser:testUser.id block:^(EVUser *user, NSError *error) {
    if(error == nil){
        // the result contains the user account
    } else {
        // handle the server error
    }
}];

To search for a user account based on its Email field, base your code on the following snippet:

[EVUser fetchUserWithEmail:@"test@user.com" block:^(EVUser *user, NSError *error) {
    if(error == nil){
        if(user == nil){
            // no user account with the specified email is found
        } else {
            // the result contains the user account
        }
    } else {
        // handle the server error
    }
}]

All Users

You can retrieve all user account in your Users content type by executing the following code snippet:

[EVUser allUsers block:^(NSArray *users, NSError *error) {
    if(error == nil){
        // the result is an array that contains all user accounts
    } else {
        // handle the server error
    }
}];
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.