3 Replies Latest reply on Mar 25, 2014 1:09 PM by philmodjunk

    Autologin script

    pandemic

      Title

      Autologin script

      Post

           I know there's an autologin feature for FMP12 that you can access from File Options. However, it seems like everyone that opens that file will log in withat username/password, which is not what I want for a multi-user solution. Having them manually log in is fine. However, there are times where it would be convenient to autologin as a specific  user, for instance when performing scripts that open or close files (admin) or opening a snapshot link (guest). I am wondering if the login can be scripted? Thanks!

        • 1. Re: Autologin script
          philmodjunk

               Options:

                 
          1.           You can set a file to "run with full access privileges". If you only need a higher level of access for a specific script to work, select this check box in the script editor.
          2.      
          3.           There's a re-login script step that can specify an account name and password while re-logging back into the current file. You will probably need to use Get (AccountName) and Get ( AccountPrivilegeSetName) to capture key info about the current user before doing this so that you can return the user to the correct level of access after the need for a different access level has passed.
          4.      
          5.           FileMaker Files can be set up as "opener" files that perform a script to open another FileMaker file with the same account name and password as was used (via an auto-enter setting in File Options) to open the "opener" file.
          • 2. Re: Autologin script
            pandemic

                 Thank you for the response PhilModJunk. It certainly looks like a lot of the stuff I want to do can be covered by your suggestions. Regarding point 2 where you mention about relogging in with the current user, that wouldn't work if they set their own password, would it?

            • 3. Re: Autologin script
              philmodjunk

                   It would require that you have a table of account names and passwords in your file so that you can use the account name to look up the password. Either that or your script would have to log them back in using a generic account name and password that happens to have the same privilege set specified. (Which could affect how other parts of your system that might need the correct account name to work properly.)

                   I'd use option 1 myself if at all possible as that leave the use logged in under their account and password.