January 30, 200619 yr I would like to display the Full Name of the Current User logged into the system I currently have an opening script that captures the AccountName and sets the CurrentUser Field but the account names are like JDOE and I want to show "Welcome: John Doe". Any way I can do this?
January 30, 200619 yr What you could do is create a USER table that would hold information unique to each user. You could have fields for the user's first name, last name, phone, fax, email address, title, etc. In the table you would also have a field that would match the user's account name. Then you could have your opening script perform a find based on the Get ( AccountName ) function. It would return all of the specifics about the user that just logged on. That's the general idea.
January 31, 200619 yr ... just relate a users table to that field you set to the account name... then on login goto the related record, set variables or globals = your users names, mobile numbers whatever and then utilize those throughout the database.
January 31, 200619 yr If you're using External Authentication then creating a user table would mean you'll that data in two places: the Active Directory and your FM file. So you'll need to update it in two places and create a new record for each new user ... kind of defeats the benefit of using EA. (Apart from the inherent security risk of storing security data as regular data). You can use a VBscript to query the AD for the user's full name and import that into FM.
January 31, 200619 yr Get the users to set their full name into FMP's preferences... then use the Get( UserName ) function.
January 31, 200619 yr ...hmmm.. i didnt even know there was a get (username) function.. is there anyway to script this in when generating an account?
January 31, 200619 yr No, it's stored in the registry and FM scripts can't touch that. You'd need to use OS-level scripting for that and then integrate that in your FM scripts. Beware though that if another user logs in to that machine and uses FM, the get(userName) result will not be correct. Unless you use a Windows logon script that queries the AD for the user's full name, writes that to the registry.
February 1, 200619 yr Wim, You can use a VBscript to query the AD for the user's full name and import that into FM. For us mere mortals this is easier said than done. Do you have an example that specifically shows how this is done? I'm interested in the VBS portion, the import I can figure out. Thanks!
February 2, 200619 yr Download the VBscript repository from my website. Look in the AD section for "List Account Page Information for a User Account".
Create an account or sign in to comment