How to get the user or his rights?
Ken Ray
kray at sonsothunder.com
Mon Mar 26 15:32:53 EDT 2012
>> 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
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list