GetAccountInfo

(Security Manager Module

Description: Returns one or more AccountData structures.
Returns: Dictionary
Usage: Script Only.
Related to: BuildFullName | GetAccountID | GetFullName | GetGroupName | GetUserName | IsLoggedOn | IsSecured | IsSuspended | SecurityCheck | UIErrorToText
Format: \SecurityManager.GetAccountInfo([AccountID, IndexByID]);
Parameters:  
AccountName
Optional. The account ID for which information is to be obtained.
IndexByID
Optional. A Boolean. If TRUE the returned dictionary will use account IDs as the dictionary key. If FALSE (default) the returned dictionary will use the account names as the dictionary key.
Comments:

To use this API, the calling code must be running in a security session that has the Manager privilege.

If AccountID is valid, a single AccountData Structure is returned for the specified account.

If Account ID is Invalid, a dictionary of AccountData structures for every account and role is returned. The dictionary uses either account names or account IDs as the dictionary key, depending on the value of the IndexByID parameter.

The AccountData structures returned here can be modified in situ and passed back into ModifyAccount or DeleteAccount to effect changes to the account records.
The Password and AltID fields of the returned structure are always Invalid.

Example:

...
  If Watch(1);
  [
    CurrentUserInfo = \SecurityManager.GetAccountInfo();
    ...

The variable CurrentUserInfo will be populated with an AccountData structure for the currently signed-in account.