Upvise Client Library: User Class (.NET)

Methods void changeName(string name) void changeEmail(string email) void activate() void deactivate() Static Methods User[] selectUsers() static void createUser(Query query, string name, string email, string password)
Properties int userid string name string email int type bool active DateTime creationDate DateTime lastModifiedDate Constants int STANDARDUSER int MANAGER int ADMIN

Overview

The User class of the Upvise Client Library allow to query and mnage Upvise Users. It requires a valid admin token.

User Sample on Github

Usage

Retrieve all users
using UpviseClient;
....
Query query = new Query(token);
User[] users = User.selectUsers(query);
foreach (User user in users) {
    Console.WriteLine(user.email + " " + user.name + " " + user.type);
}
Change a User name or Email
using UpviseClient;
....
Query query = new Query(token);
User[] users = User.selectUsers(query);
foreach (User user in users) {
    if (user.email == "john@upvise.com") {
        user.changeName("My New Mame");
        user.changeEmail("john2@upvise.com");

}
Create a new Standard User
using UpviseClient;
....
Query query = new Query(token);
User.createUser(query, "John Doe", "john3@upvise.com", "XFKGTIH694857");
Deactivate a user
using UpviseClient;
....
Query query = new Query(token);
User[] users = User.selectUsers(query);
foreach (User user in users) {
    if (user.email == "test@upvise.com") {
        user.deactivate();
}