ISecuritySubject.MemberOf

Syntax

MemberOf: IMetabaseGroups;

Description

The MemberOf method returns a collection of the groups to which the given security subject is included.

Example

To execute the example, make sure that the security manager contains users.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MSec: IMetabaseSecurity;
    Users: IMetabaseUsers;
    Groups: IMetabaseGroups;
    Group: IMetabaseGroup;
Begin
    MB := MetabaseClass.Active;
    MSec := MB.Security;
    Users := MSec.Users;
    Groups := Users.Item(
0).MemberOf;
    
For Each Group In Groups Do
        Debug.WriteLine(Group.Name);
    
End For;
End Sub UserProc;

After executing the example names of groups where the first user located and registered in a security manager are displayed in the development environment console.

See also:

ISecuritySubject