Good day all,
I have an existing application that stores usernames and passwords in an SQL database. We frequently add and remove users from that application/SQL database.
We now want to give those users access to a FileMaker solution that is hosted on FMS 15 WebDirect. We need to be able to identify the user within the FileMaker solution (eg script step "Insert Current User Name").
Please advise if the following is the correct approach.
Auto-login to solution as a user that has access to a single layout that accepts username and password.
Pass the username and password to a script that checks against SQL.
If the username doesn't exist in SQL, fail
If the username and password don't match SQL, fail
If the credentials match but account is not marked "active" in SQL, fail and look for FileMaker user by the same name and delete FileMaker account
If the credentials match and account is "active" in SQL, look for FileMaker user by the same name and create( if it doesn't exist, then pass the credentials to "re-login" script step.
How would I check if a FileMaker account exists, if I'm approaching this the right way.