How do I use the UserSettings object in COM API?

How do I use the UserSettings object in COM API?

Answers

  • kkoponenkkoponen Posts: 4 Newbie

    What I do in C# (stripped down) after fumbling around, to generate a report:

    using SFTPCOMINTERFACELib;
    ...namespace class, Main statements
    }}}
    CIServer server = new CIServer();
    server.Connect("serverName", port , "admin ID", "password"); /* working on making ID and password inputs
    try
    CISites sites = server.Sites();
    for (int i = 0; i < sites.Count(); i++)
    {
    CISite site = sites.Item(i);
    List accountList = new List();
    foreach (string name in users)
    {
    CIClientSettings userSettings = site.GetUserSettings(name);
    List groupList = new List();
    object inherit;
    bool boolEnableAccount = userSettings.GetEnableAccount(out inherit);
    string accountEmail = userSettings.Email;
    string accountCreationTime = userSettings.AccountCreationTime.ToString("MM/dd/yyyy HH:mm:ss");
    ...
    }
    foreach (string group in groups)
    ....
    }
    catch
    {...}
    finally
    {...}
    }}} closing Main, class, namespace

    Hope this helps, Karjala

Sign In or Register to comment.