get_users NSSOAP Methods

The get_users method retrieves user information for one or more NET SatisFAXtion users. The response from this method is a GET_USERS_RESULT object, that contains user information in an array of USER_INFO objects.

Information about a specific user can be retrieved by providing a user name in the only_this_user parameter.  When this parameter is used, the returned USER_INFO array contains only one object.

GET_USERS_RESULT get_users(
  string user_name, // Fax server user name
  string user_password // Fax server user password
  string only_this_user // Only get this user
)

Parameters:
user_name A NET SatisFAXtion user name.

user_password The password for the user.
 
only_this_user The name of a fax server user that specifies the only user to retrieve. This parameter is optional and can be null.

Return Value:
A GET_USERS_RESULT object containing a result code and string, and an array of USER_INFO objects if the function was successful.

Example:
public void fill_ListView_with_users(ListView lv)
  {
  NSSOAP ns = new NSSOAP();

  GET_USERS_RESULT ur = ns.get_users("supervisor","",null);

  if (ur.status_num != STATUS_NUM.NoError)
    {
    MessageBox.Show(ur.status_string);
    }
  else
    {
    lv.Items.Clear();

    foreach (USER_INFO ui in ur.users)
      {
      ListViewItem lvi =
        new ListViewItem(new string[]
          {
          ui.user_name,
          ui.full_name,
          ui.description,
          ui.email_address
          });

      lv.Items.Add(lvi);
      }
    }
  }

See Also:
send_message, get_message_q, get_message