SmarterMail Pro™ Administration Web Services

svcUserAdmin.GetUser Method 

Returns attributes of the specified user.

public UserInfoResult GetUser(
   string AuthUserName,
   string AuthPassword,
   string EmailAddress
);

Parameters

AuthUserName
User name with domain administrative privileges
AuthPassword
Password for AuthUserName
EmailAddress
Account to get attributes for

Return Value

A UserInfoResult instance containing the results of the GetUser action.

Example

This sample retrieves the attributes of an email account and displays the user's full name and domain admin status.

using System;
using svcUserAdmin;

class svcUserAdminGetUser
{
 static void Main()
 {
   svcUserAdmin admin = new svcUserAdmin();
   UserInfoResult request = admin.GetUser("admin@domain.net",
                                          "alskdjfhtt",
                                          "dlindt@domain.net");

   if(request.Result)
   {
     UserInfo ui = request.UserInfo;
     Console.WriteLine ("Full name: {0} {1}", ui.FirstName, ui.LastName);
     Console.WriteLine ("Has domain admin privileges: {0}", ui.IsDomainAdmin);
   }else{
     Console.WriteLine (request.Message);
  }
}

See Also

svcUserAdmin Class | svcUserAdmin Namespace