AllUsers: ISecuritySubjects;
The AllUsers property returns the collection of all users available in the current repository.
This collection includes all users who can be used on working in the repository:
Users created in the security manager of the repository.
Users having the attribute of the lazy loading of description.
NOTE. In Windows OS, domain users are also included in the collection. The users with the attribute of lazy loading will have only the basic description available (name, security subject type and security descriptor). To get all custom parameters, use the IMetabaseSecurity.ResolveName, IMetabaseSecurity.ResolveSid methods or search via IMetabaseSecurity.NewSubjectsSearch.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Users: ISecuritySubjects;
User: ISecuritySubject;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
// Get list of users
Users := MS.AllUsers;
Debug.WriteLine("List of users (" + Users.Count.ToString + "):");
For Each User In Users Do
Debug.WriteLine(User.Name);
End For;
End Sub UserProc;
After executing the example the development environment console displays the list of all users available in the current repository.
See also: