June 25, 200520 yr I need to offer the possibility to re-login into the system in FMP7, because I have a lot of users using diferent computers
June 25, 200520 yr First, it's not important the number of windows that are open, but rather the number of files. To get each file logged out (or logged in with a new user) will require a master calling script that executes a relogin sub-script in each open file. You can tell which files are open (hidden or not) with the DatabaseNames function. Check the list of database names that function returns for each file in your solution to decide if you should run the relogin script in each of those files: If [ position(DatabaseNames; "Contact
June 27, 200520 yr If you use a custom dialog for the login window, and have this pop up when the user logs out, you can choose to not have a cancel button (this would keep the new user from accessing the file with the previous login.) The custom dialog might just have a "Quit" button and a "Login" button, where the Login button attempts to use the account and password from the input fields for a Relogin. When the login is successful, ALL open windows for that file will have the access privileges of the new user. If you still want to close all the other windows so your user always starts in the main menu, then have the Logout script close all open windows except one (or except the main menu.) Window management can be somewhat complex, and it's not clear how you're managing yours. If your scripts are going to be opening new windows, then it may be helpful to give them meaningful names that can then be used to identify the windows in future navigation scripts and in this case, the Logout script. You can figure out which windows are open by using the WindowNames function in the same way I described the DatabaseNames function above.
June 27, 200520 yr The problem with FileMaker's login window, is that Cancel button. If logging out brings up the relogin window, the next user could cancel it to gain access to the system with the previous user's account. The custom dialog is one way to prevent that. I suppose you could have a dummy account setup where logging out actually does a Relogin (no dialog) to this dummy account. This dummy account would not have access to do anything but see a login layout and execute scripts. So after logging in with the dummy account, then a normal Relogin would allow the next user to login--and canceling the Relogin would only give access to the login layout. You can put a "Login" button on this layout so they can get back in after canceling.
June 28, 200520 yr Author The problem with FileMaker's login window, is that Cancel button. If logging out brings up the relogin window, the next user could cancel it to gain access to the system with the previous user's account. The custom dialog is one way to prevent that. I suppose you could have a dummy account setup where logging out actually does a Relogin (no dialog) to this dummy account. This dummy account would not have access to do anything but see a login layout and execute scripts. So after logging in with the dummy account, then a normal Relogin would allow the next user to login--and canceling the Relogin would only give access to the login layout. You can put a "Login" button on this layout so they can get back in after canceling. That is a wonderful idea, Ender
Create an account or sign in to comment