Page 1 of 1 1
Topic Options
#122517 - 2004-07-09 08:14 PM Username Check
Thunder7 Offline
Fresh Scripter

Registered: 2004-01-06
Posts: 8
Is it possible to use a IF statement when the condition you are looking for is a username? What is the syntax if so for checking for a username?

Example:
IF username = "ABCD"
DO SOMETHING
ENDIF


Top
#122518 - 2004-07-09 08:23 PM Re: Username Check
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi Thunder welcome to KORG. You can check the current username in a login script with this:

Code:


if @USERID = "Thunder7"

?"yup"

else

?"nope"

endif



If your checking this in an admin script, checking usernames other than what your currently logging-in/logged-on as, then thats a different story.

-Shawn


Top
#122519 - 2004-07-09 08:26 PM Re: Username Check
Thunder7 Offline
Fresh Scripter

Registered: 2004-01-06
Posts: 8
Thanks for the info.

Basically we have a few situations from time to time where we need to put a check in a script for a particular user to give them something special (a different mapping ususally).

So that should work?

Top
#122520 - 2004-07-09 08:27 PM Re: Username Check
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
yes, that will work. @USERID returns the ID of the user running the script.
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
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.054 seconds in which 0.027 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