How to get the user or his rights?
Klaus on-rev
klaus at major.on-rev.com
Mon Mar 26 15:37:25 EDT 2012
Hi Ken,
Am 26.03.2012 um 21:32 schrieb Ken Ray:
>>> You can get the name of the user that is logged in by checking the environment variables $USERNAME (on Windows) and $USER (on Mac). As to the user's permission level, this is what I use (watch line wraps):
>>> function stsIsAdminUser pName, pComputer
>> what is "pComputer", resp. how do I get this value?
>
> Whoops! Sorry, you can pass the environment variable $COMPUTERNAME under Windows (it's not needed for Mac) … I call the function like this on Windows:
> put stsIsAdminUser($USERNAME,$COMPUTERNAME) into tResult
Ah, OK, thanks! :-)
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
Best
Klaus
--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com
More information about the use-livecode
mailing list