2
Answers

How to tackle this session problem?

vishal narvekar

vishal narvekar

13y
10.9k
1
    I have a question regarding storing the status of user.

The following requirement are there:

When authorized user logs into the system.he/she is not allowed to login from another computer or in different browser other than he is using right this time.-

Remedy we applied here as : We have kept " Is_Loggedin" as a column with data type "bit" in a mst_vendor as a table name. when a user logs in we set the flag to Is_Loggedin as "1" and each time when someone tries to log in using this account,the system is showing the error "The user is already logged in"

 When he logs out it turns to "0" as logout procedure calls as soon as he clicks log out button. 


Problem scenario:

1.When user closes the browser the flag remains the same i.e "1"

2.When power gets off,It remains the same as "1"

3.If session timeouts after a predefined value it remains the same.

4.There may be different scenarios other than this.

Is there any way so that we can store this internal flagging for user's login status using application object.

It may improve efficiency of the system and also eliminates the above problematic scenarios


Answers (2)