Jscott Posted January 30, 2006 Posted January 30, 2006 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?
Ted S Posted January 30, 2006 Posted January 30, 2006 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.
Genx Posted January 31, 2006 Posted January 31, 2006 ... 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.
Wim Decorte Posted January 31, 2006 Posted January 31, 2006 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.
Vaughan Posted January 31, 2006 Posted January 31, 2006 Get the users to set their full name into FMP's preferences... then use the Get( UserName ) function.
Genx Posted January 31, 2006 Posted January 31, 2006 ...hmmm.. i didnt even know there was a get (username) function.. is there anyway to script this in when generating an account?
Wim Decorte Posted January 31, 2006 Posted January 31, 2006 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.
Ted S Posted February 1, 2006 Posted February 1, 2006 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!
Wim Decorte Posted February 2, 2006 Posted February 2, 2006 Download the VBscript repository from my website. Look in the AD section for "List Account Page Information for a User Account".
Recommended Posts
This topic is 6868 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now