#118457 - 2004-04-22 04:27 PM
Re: Upgrading? To Upgrade?
|
maciep
Korg Regular
   
Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
|
Actually, didn't INGROUP change? Look at the return values
3.63
Quote:
INGROUP( )
Action: Checks whether the current user is a member of a group. Syntax: INGROUP ("group name") Parameters: Group name - Identifies the group in which to check the user's membership. Remarks: INGROUP can be used to check for groupmembership of groups that exist on the domain or server where the user is logged on, or to check for groupmembership of groups on a specific domain or server. When checking for a local group, INGROUP identifies that the user is indirectly a member of the group by virtue of being a member of a global group which, in turn, is a member of the local group.
If you want to check for membership in a group on a specific domain or server, use the following format:
"OtherDomain\group" –or – "\\SomeServer\group"
For Windows 9x clients, INGROUP works on local groups only if the KiXtart RPC service is running. Returns: 0 The user is not a member of a group with this name. 1 The user is a member of a global group with this name. 2 The user is a member of a local group with this name. Examples: IF INGROUP("Domain Users") DISPLAY "z:\users.txt" ENDIF
IF INGROUP("Developers") = 2 ? "Member of local group Developers" ENDIF
IF INGROUP("\\" + @WKSTA + "\Developers") = 2 ? "Member of local group Developers on local system" ENDIF
4.22
Quote:
InGroup( )
Action: Checks whether the current user is a member of a group. Syntax: INGROUP ("group name" [<,> "group name 2"], mode) Parameters: Group name, group name 2, group name X… Identifies the group(s) in which to check the user's membership. You may pass multiple group names as arguments -or- a single array who's element(s) are the names of one or more groups to test. Note: This function does not currently support passing multiple arrays as arguments.
Mode
Optional integer parameter indicating whether or not InGroup checks for group membership of one or all groups in the list (default = 0). Possible values:
0 InGroup checks for membership of ONE of the groups in the list (default) 1 InGroup checks for membership of ALL of the groups in the list Remarks: INGROUP can be used to check for groupmembership of groups that exist on the domain or server where the user is logged on, or to check for groupmembership of groups on a specific domain or server. When checking for a local group, INGROUP identifies that the user is indirectly a member of the group by virtue of being a member of a global group which, in turn, is a member of the local group.
If you want to check for membership in a group on a specific domain or server, use the following format:
"OtherDomain\group" –or– "\\SomeServer\group"
For Windows 9x clients, INGROUP works on local groups only if the KiXtart RPC service is running. Returns: 0 The user is not a member of a group with this name 1 The user is a member of a global group with this name See Also: EnumGroup( ), EnumLocalGroup( ), Group Membership Information Examples: If InGroup("Domain Users") DISPLAY "z:\users.txt" EndIf
If InGroup("Developers", "Testers") = 1 ? "Member of Developers OR Testers group" EndIf
If InGroup("Developers", "Testers", 1) = 1 ? "Member of Developers AND Testers group" EndIf
$Array = "Developers", "Testers" If InGroup($Array, 1) = 1 ? "Member of Developers AND Testers group" EndIf
If InGroup("\\" + @WKSTA + "\Developers") = 1 ? "Member of Developers on local system" EndIf
_________________________
Eric
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 764 anonymous users online.
|
|
|