The application am talking about is powerbuilder Application (coded with powerscript).
What i want to archive is when user log into application it's get the machine ip when same user log in again using a different machine ip concurrently system admin can disable the user from accessing the application.
Assuming you connect to a database when you log on to your application you can track the connection (insert a row into a table) for that userid. As part of the log on process you then query that table to see if the user is logged on and prevent them if they are. HOWEVER, you need to have some sort of process of clearing entries from this table should the user drop network connectivity, shut off the PC, or some other type of situation which prevents the application from clearing their entry from the table as part of a 'normal' exiting of the program. In MS SQL Server you can also track the users via various system procedures and do the same (prevent simultaneous connections) but these may not work if you have permissions locked down.
Thank you. actually have tried your option where i created a table to insert record of user log in. Now the issue still having is to record user log out entry when there is network drop, PC shut down...etc. For a normal log out i can achieve. Am using posgreSQL database.
You can also have the new instance of the program "hijack" the session, and then disable the old instance.
For that you'd need to remember your login time and then periodically (for example via a timer event on your main window) check if your session still has the same login_time. If not, you can disable / close / whatever the current program.
That way you can make sure that your users can always open a new instance of your program (even if the old instance crashed) and you have the side benefits that your users don't have to access their other computer to close the previous session. (Imagine someone at the office finding out that they've left the program running on their computer at home)
There are no replies made for this question yet. However, you are not allowed to reply to this question.
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.
What i want to archive is when user log into application it's get the machine ip when same user log in again using a different machine ip concurrently system admin can disable the user from accessing the application.
Hope have put it clear now.