So, here is my question: how do I set the main form based on the current logged in user name or a role assigned to that user?
Thanks,Bill
In your own example instead of System.Environment.MachineName i am pretty sure you can do System.Environment.UserName, which returns the logged on user on the machine.
Then you can extend your users table (or create a new table with additional userinfo and link it to the users table) with info on which form to load on startup.
Then you should be able to read the user, query your field with forminfo for that user and show the returned form.
/Teddy
If you're looking for the current logged in StrataFrame user, you can get access to the username through the MicroFour.StrataFrame.Security.SecurityBasics.CurrentUser.Username property. However, the ShowGateway gets called before the ShowLoginAndInitMainForm, so you will want to just move your code that shows the login form to the ShowGateway just like you would have it in the ShowLoginAndInitMainForm method.
Thanks! The UserName from the System.Environment namespace is exactly what I needed. I am setting the SF Current User to the AD User, so they are the same after authentication is settled.
Have a good day!Bill