Page 1 of 1 1
Topic Options
#206747 - 2013-02-22 11:30 AM Exclude user from group.
Bengaul Offline
Just in Town

Registered: 2013-02-21
Posts: 4
Loc: UK
Dear all,

I have just started with Kixtart, as I have inherited it in my new job. All is going OK, but I have a query with mapping drives. We have a user in a group who needs to be in the group, but does not need the drives that the group does. So I tried:

IF INGROUP ("USERS") and <> @USERID "user"
USE I: "\\MAPPED\DRIVE"
ENDIF

However this had the unexpected result of not mapping that drive to anyone!

How do I do this correctly?

Many thanks.

Ben.

Top
#206748 - 2013-02-22 11:57 AM Re: Exclude user from group. [Re: Bengaul]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
Hi Ben,

Welcome to the board. The @USERID is a macro. It returns the user id of the person running the script. It is not a function. So, you need to compare the result of the macro to the desired user id. That is, move the "not" to the other side of the macro.
 Code:
@USERID <> "user"


Regards,

Brad

Top
#206752 - 2013-02-22 01:16 PM Re: Exclude user from group. [Re: BradV]
Bengaul Offline
Just in Town

Registered: 2013-02-21
Posts: 4
Loc: UK
Ah, OK. I'll give that a try and let you know.
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 2312 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.152 seconds in which 0.127 seconds were spent on a total of 13 queries. Zlib compression enabled.

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