- case CODE_ID_LOCKED:
- $MSG .= LOGIN_ID_LOCKED;
- break;
-
- case CODE_ID_UNCONFIRMED:
- $MSG .= LOGIN_ID_UNCONFIRMED;
- break;
-
- case CODE_NO_COOKIES:
- $MSG .= LOGIN_NO_COOKIES;
- break;
-
- case CODE_EXTENSION_PROBLEM:
- if (IS_ADMIN()) {
- $MSG .= sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "nickname");
- } else {
- $MSG .= LOGIN_WRONG_ID;
- }
- break;
-
- default:
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unhandled error code %s detected.", $ERROR));
- $MSG .= LOGIN_WRONG_ID;
- break;
- }
- $MSG .= "</span>
+// Login problems?
+if (!empty($errorCode)) {
+ // Do we have a userid set?
+ if (isSessionVariableSet('current_userid')) {
+ // Then prefetch data for this account
+ fetchUserData(getSession('current_userid'));
+ } // END - if
+
+ // @TODO Move this HTML code into a template
+ $content['message'] = '<tr>
+ <td colspan="4" align="center">
+ <span class="guest_failed">' . getMessageFromErrorCode($errorCode) . '</span>