TestUserInGroup - method of object Pm
Test if the user is or isn't a member of the user group.
TestUserInGroup(nType As Long, sGroups As String, [sUserId As String]) As Boolean
b = Pm.TestUserInGroup(nType, sGroup, sUserId)
|nType||(Long) Type of the tested user|
0 - as a user the local logged-on user is used
1 - as a user the value of the sUserId parameter is used
|sGroups||(String) The list of identifiers of the user groups (separated with comma ',') where the user is searched.|
|sUserId||[optional] (String) Identifier of the local or network user|
true - the user is a member of any listed group
false - the user isn't a member of any listed group
If the designer creates a permissions system in the application based on logical user groups, then the method enables to test from a script if the logged-on (or else) user is a member of the group.
This method is not so far
functional for Web Panels
Test if the local logged-on user is a member of the $OPER