Have your user ever encountered the problem when receiving the warning message from your web application that created by PHPMaker as following: “User NX already logged in!” (even this user NX has closed the browser) and then he/she report it to you as Administrator of your web application? Well, this warning message shows up usually when the user closes the browser without logout explicitly from the web application, then the user clears the cookies/cache of his/her browser, and then he/she is trying to login again to the web application. When this is happened, each time your user is trying to login to your web application, then he/she will get the same messsage as I mentioned above. In other words, your user is not able to login to the web application anymore.
The causes of this problem is that since the user closes the browser and does not do logout explicitly from the web application, then the SessionID value is still being kept in the User Profile field in the users table, and in the same time, the cookies that hold that SessionID has been removed from the browser. The only solution to overcome this problem is by clearing the SessionID value that stored in the User Profile field of your users table. Unfortunately, when you as Administrator go to that users table and check that User Profile field, then you will see that the value of this field contains some User Profile values, such as: SessionID, LoginRetryCount, LastPasswordChangedDate, and LastBadLoginDateTime. All of those values are stored as an array in that User Profile field. So you have to be careful to remove the value of that user’s SessionID, otherwise your web application will display the message to your user that the User Profile value is corrupted.
In order to avoid it happened, and also to avoid the mistyped or misedited while clearing that SessionID value, then there should be a web page provided to you as an Administrator in order to manage that SessionID. Well, the good news is: I have successfully created that page that can be used to clear or remove or free-up your users’ SessionID. This page can only be accessed by the users which have Administrator level (of course, you can add another user levels in addition to Administrator according to your needs by yourself later). There is only one ComboBox and one CommandButton in this page. The ComboBox will only display the User ID which have the SessionID value. By using this page, then you (as an Administrator) will not to be worried anymore to clear your users’ SessionID.
In the future, when your users report the same problem as the message shown above, then simply choose the User ID from that ComboBox, and click on the CommandButton, and voila… the value of that user’s SessionID will be removed/cleared, then tell your user back to try to login again, and this time he/she will be happy. The User IDs which have the SessionID that had been cleared (including those which have logged out explicitly) will not be listed in that ComboBox again. So you will only see the User IDs which have the SessionID value are listed there.
All we have to do is customizing the PHPMaker template files. In other words, we do not modify any generated script files.
Please click on the following image below to watch the demo:

Recent Comments