Newbies StephenA Posted March 30, 2003 Newbies Posted March 30, 2003 I need to setup a login for an application. The login is not so much from a security perspective but more from the point of view of determining which user is using the database. The login name will then be inserted into various database records created by the user. The username needs to be common across many related databases. I was hoping to use the "User name" field in the application preferences. However I can't find a way of editing this field via a script.
CobaltSky Posted March 30, 2003 Posted March 30, 2003 Hi Stephen, If you want to edit the username (as set in the 'Application Preferences' dialog) via a script, you will need to use a plug-in such as DialogMagic from New Millennium Communications. DialogMagic: http://www.nmci.com/Product_Overview.htm?pid=P62XAGWYVVA6V34XWFP5&-session=dwc:72AE1457F79F341E651D4760F5EE5413 ...which provides the function External ("DM-AppPrefs", paramenter) for automatically setting various prefs including the user name via a script. However there are a couple of other options. One would be to set up a different group for each user (ie assign every password to a different group) and then use the Status(CurrentGroups) function to identify who it is that is logged in. Another would be to use your own separate login and password arrangement, and have the username of the person who logs in written to a global field. Then you will be able to reference the relevant global field whenever you want to access the name of the current user. In this scenario, an auto-enter field for creator would use the auto-entry by calculation option to pick up the value from the global username field, rather than the standard creator name option. Hope that gives you some ideas and options to work with.
Pupiweb Posted March 30, 2003 Posted March 30, 2003 It really depends on what you want to do and what's your set up - "simply" record username of who created/modified a record: use built-in Username; despite its limitations it might be good enough - reliably record username of who created/modified a record in a user-proof way -- Subhypothesis 1: you've a "constant" and limited number of users: Create a password for each user, associate it with a group, retrieve user by the Status (currentGroupus) function -- Subhypothesis 2: you've a "variable" and/or large number of users: Create you own login scheme, with a Users.fp5 file. The example CobaltSky mentioned is an excellent one Get a file named "The Gateway" at www.fmfiles.com for an open source one
Recommended Posts
This topic is 7913 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