Wednesday, 31 March 2010

Bug: Set UTF-8 mode for user names in persistent logins

The {\tt cookie::storeCookie} and {\tt cookie:testCookiePresent} methods failed to set UTF-8 mode when reading and writing the cookie token file for persistent logins. This caused warning messages when sorting cookie user names in the administrator Persistent Login Manager page. This change will force all users with non-ASCII login names to log back in, as their cookies will not match those stored with the incorrect file encoding. As it happens, there were only two such and both were inactive accounts, so I just purged the persistent logins for them myself.

Bug: Eliminate unnecessary sorting in enumerating accounts, sessions, and persistent logins

When enumerating public accounts for the browse public accounts page, or all user accounts, open sessions, or persistent login tokens for the administrator, we unnecessarily sorted the names of the files in the respective directories before retrieving them into the hash used to build the displayed table. Since the table generation code sorts the hash keys, there is no need to sort the file names, which can be very time consuming when these directories get large. If these directories get very much larger, it may make sense to read them serially and perform the {\tt grep()} on them within the loop rather than bringing the directory into memory and using the {\tt grep()} function as presently done.

Feature: Choose Active/Inactive/All accounts on public and administrator browse

To expedite display of public accounts, I added a drop-down box to the ``Browse public user accounts'' item on the Utilities page which allows the user to select active, inactive, or all accounts with active the default. An active account is defined as one with a transaction within the last 30 days. In addition, the user can switch between the display of active, inactive, or all public accounts on the Browse Public Accounts page.

Under Administrator Functions on the Utilities page, the administrator may choose, when managing user accounts, to display active, inactive, or all user accounts (as for public accounts, active means a transaction within the last 30 days), and may switch selections from the Account Manager page. In addition, the administrator can access a user account directly by name to view, purge logs, or delete. For the latter two functions, the administrator password must be entered as a confirmation before the button is pressed.

Bug: Error message for administrator accessing nonexistent account

If the administrator attempted to access (view) a nonexistent account, the application would exit with an error and yield a blank screen. With the original account manager, this could happen only if the user deleted the account between the time the list was displayed and when the administrator attempted access, but with the direct access facility, the error would occur whenever the administrator entered an invalid account. I added an explicit error message for this circumstance which includes the invalid account name.

Bug: Error messages for administrator purge or delete account

The error messages generated when the administrator attempts to purge the logs or delete a nonexistent account name were missing a space before the name of the account---fixed.