{{tag>category:"OpenInsight Specific"}} [[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== Login and users (OpenInsight Specific) ==== === At 28 JUL 1998 05:32:55AM Kelly wrote: === We want to create a login system. It will prompt for a user and password. An appropriate menu is run for each user. In the dialog box prompting for the password, how can we suppress the display of the password as it is being typed in? How can we access the user name, which was entered in our login dialog box, throughout the system. ---- === At 28 JUL 1998 08:40AM Don Bakke wrote: === Kelly, [i]In the dialog box prompting for the password, how can we suppress the display of the password as it is being typed in?[/i] This is easy, editlines have a checkbox called "Password" that will display only astericks as the user types and any time the information is displayed. [i]How can we access the user name, which was entered in our login dialog box, throughout the system. [/i] Two fairly simple ways of doing this. First is to set one of the global variables (@USER1-@USER4) to match the name of the user. Of course you need to make sure that this variable never gets reset by any programs. Second is to create a user-defined property of a window that is permanently running with the name of the user. For instance: LoginName=Get_Property("LOGIN_ENTRY.LOGINNAME", "TEXT") rv=Set_Property(SomeAlwaysRunningWindow, "@LOGINNAME", LoginName) Then whenever you need to access the current user just do the following: LoginName=Get_Property(SomeAlwaysRunningWindow, "@LOGINNAME") Most of our apps have a primary window which, if closed, will close the entire app so it makes sense to use this window to hold information that needs to be accessible to the entire application. If you don't have this type of setup, then launch an invisible window to hold any global information like this. But then you need to make sure that the last regular OI window will close this invisible window as well or your app will continue to stay running for no apparant reason. I'm assuming that you are bypassing the normal OI login entry window by launching OpenInsight with the /UN and /PW parameters filled with a generic username. Just keep in mind that @USERNAME also exists as a system global variable that holds the name used to login into OpenInsight. In this case, however, it won't be much use unless you can alter its contents (never tried it), in which case forget all of the above and simply use this variable. dbakke@srpcs.com [url=http://www.srpcs.com]SRP Computer Solutions[/url] [img]http://www.srpcs.com/srpicon1.gif[/img] ---- === At 28 JUL 1998 12:53PM Brandon Lunt wrote: === Another way to mask input, if you are writing your own login procedure is to use the Msg Function then set the @User variable to the user name that was entered. In order to mask input on a Msg box set field 15=1. (example) Mess=User Name: ':Name Mess=RCE' Mess=Enter Password' Mess=1 Password=Msg('',Mess) ---- === At 28 JUL 1998 04:51PM Kelly wrote: === Don, Thanks for the help. I have one large application. Different users have different entry points. Eg the finance people see one part of the system. Under ARev we could have one account and multiple users each with their own entry menu. I was trying to have the same facility under OI. Kelly ---- === At 28 JUL 1998 06:29PM Don Bakke wrote: === Kelly, [i]I was trying to have the same facility under OI.[/i] This is also what are systems do. Here is the basic flow of operation: 1. OpenInsight is launched with a generic username and password (to avoid OI's login screen) 2. The application starting point is our own login screen with a password field 3. When the user enters a valid username and password, the system checks to see what their own personal starting window is and launches that 4. The login screen is made invisible and a user defined property is established to hold the name of the user 5. When the last application window is closed, the login window is closed as well dbakke@srpcs.com [url=http://www.srpcs.com]SRP Computer Solutions[/url] [img]http://www.srpcs.com/srpicon1.gif[/img] [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=24A9ADF25BC2A29E8525664F003473FA|View this thread on the forum...]]