Page 1 of 1 1
Topic Options
#118787 - 2004-04-29 04:40 PM Correct format for if ingroup 'or' group
jameswise Offline
Fresh Scripter

Registered: 2004-04-26
Posts: 9
Hi,

what is the correct variable code to say if a person is in x group, or y group then map same share to drive v.

Thanks.

Top
#118788 - 2004-04-29 04:56 PM Re: Correct format for if ingroup 'or' group
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
This would map the drive if they were a member of either group...

Code:

If InGroup("group1","group2")
Use V: "\\server\share"
Endif



This would map the drive if they were a member of both groups...

Code:

If InGroup("group1","group2",1)
Use V: "\\server\share"
Endif



Here is what the manual (that you should read before posting such questions) say....

Quote:

INGROUP
Action
Checks whether the current user is a member of one or more groups.

Syntax
INGROUP ("group name" [<,> "group name 2"], Mode)

Parameter
Group name1, group name 2, group name …
Identifies the group(s) in which to check the user's membership. Multiple group names may be passed as arguments. Alternatively, you may specify a single, one-dimensional, array of which the element(s) are the names of one or more groups to test.
Mode
Optional integer parameter indicating whether or not Ingroup checks for groupmembership 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.




Top
#118789 - 2004-04-29 05:11 PM Re: Correct format for if ingroup 'or' group
jameswise Offline
Fresh Scripter

Registered: 2004-04-26
Posts: 9
Much appreciated, I was using the wrong variable.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1471 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.058 seconds in which 0.032 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org