The Users collection manages the list of users authorized to access Stonefield Query. Information about each user is stored in a User object. The Users collection is referenced by the Users property of the Application object.
The help topic for the IsValidUser method contains an example showing how to add users to the Users collection using scripts. Note if the maximum number of licensed users has already been added, the AddItem method returns a null value, so any script code has to handle this.
In addition to the usual properties all collections share, the Users collection has the following properties, which reflect properties of the User object for the logged-in user; see the User object help topic for a complete description of these properties.
|Administrator||Boolean||True if the logged-in user is in the Administrators role.|
|Advanced||Boolean||True if the logged-in user is an advanced user.|
|ErrorMessage||String||The text of the error message if a method fails.|
|UserName||String||The name of the logged-in user.|
In addition to the usual methods all collections share, the Users collection has the following methods:
|GetLicenseCount||Returns the number of licenses activated.|
|IsValidUser||Determines if the specified user name is in the list of authorized users.|
|Login||Attempts to log in the specified user.|