August 18, 200421 yr i'm developing a web based application using fm7 and i want to know if there's a way to prevent multiple simultaneous login using the same username and password? regards, clifford
August 18, 200421 yr you could have a startup script that flags a user's record upon login. Then if the same user tried to log in again, the presence of the flag would immediately log the user out. When the user logs out you would need to set the flag to allow the user to log in next time.
August 18, 200421 yr It's the logging out part that's tough over the web: if the user just closed their browser (or the computer crashes) then the system still thinks the user is logged in.
August 18, 200421 yr I figured out a solution using IWP in FM7..... Have a startup subscript that only runs for web users (use the get(applicationversion) function) The startup script disables the user's account upon login. A logout button on the web layout would run a script that enables the user's account before using the exit application script step to close the database. The best part is when I put the same subscript in the file options to automatically run when the database closes. If the user clicks the logout button then it just repeats the enable account without effect. But if the user quits the browser or just walks away, the script will run, re-enabling the account when the IWP session times out. (the time is specified by the session timout in the IWP prefs) I've implemented this in my own online instrument scheduling system... and it seems like a good way to prevent one user from hogging multiple sessions at once and clogging up the system. (especially since you only get 5 concurrent sessions unless you get server advanced)
September 10, 200421 yr Author can you post the script so i can test it in my application? regards, clifford
September 10, 200421 yr Here is a clone of my file.... Look at the startup script and the web_closing script the password for the full access account: UserName: root Password: root In accounts and privs, all of the other accounts have the same name and password as the corresponding privilege set. mslabClone.fp7.zip
Create an account or sign in to comment