There are two script functions: Get(AccountName) and Get(UserName). The latter is not as secure.
Get(AccountName) function Format Parameter None Data type returned text Description For FileMaker authentication, Get(AccountName) returns the name of the authenticated account being used by the current user of the database file. If a user is using the default Admin account, Get(AccountName) returns Admin. If a user is using the FileMaker Pro guest account then [Guest] will be returned.
For external server authentication, Get(AccountName) returns the name of the authenticated account being used by the current user of the database file, not the group the user belongs to (the group name appears in the Account list when you define accounts and privileges in FileMaker Pro). If an individual belongs to more than one group (account), the first group name listed when youView By Authentication Order while defining accounts and privileges determines access for the user.
Get(UserName) function Format Parameter None Data type returned text Description Returns the name of the FileMaker Pro user, as specified in the General tab of the Preferences dialog box. The returned name is user-specified. Important For greater security, use Get(AccountName) to track and manage user access: a user cannot change the account name used to log in to a database file. Note See Solving calculations on a host machine for information about running scripts in client/server and peer-to-peer environments. Example Returns Sharon Lloyd when Sharon Lloyd is the current user.
Jade> It is useless for me. These functions returns user name who is logged to FM database and it is always the same name in my case.We use one general login for web access. That is way I need to read system login to distinguish who is logged in.
comment> GetValue( Substitute( Get ( DesktopPath ) ; "/" ; "¶" ) ; 4 ) this could be a way. I'll try it.