X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-login.php;h=15863bb1f96a6cef28bd294766a9fba2cfcc65a0;hb=8d2c9b91eb82ea74fac58b2541982f760d0f77fc;hp=6c103960240194df0970c83f74cbb26f11430cb7;hpb=7729ff9ea30f10fa2383ff681cbb11b31e833acb;p=mailer.git
diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php
index 6c10396024..15863bb1f9 100644
--- a/inc/modules/guest/what-login.php
+++ b/inc/modules/guest/what-login.php
@@ -1,7 +1,7 @@
-
|
-
- ";
-
- switch ($errorCode) {
- case getCode('WRONG_PASS'):
- $message .= getMessage('LOGIN_WRONG_PASS');
- break;
-
- case getCode('WRONG_ID'):
- $message .= getMessage('LOGIN_WRONG_ID');
- break;
-
- case getCode('ID_LOCKED'):
- $message .= getMessage('LOGIN_ID_LOCKED');
- break;
-
- case getCode('ID_UNCONFIRMED'):
- $message .= getMessage('LOGIN_ID_UNCONFIRMED');
- break;
-
- case getCode('NO_COOKIES'):
- $message .= getMessage('LOGIN_NO_COOKIES');
- break;
-
- case getCode('EXTENSION_PROBLEM'):
- if (IS_ADMIN()) {
- $message .= sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'nickname');
- } else {
- $message .= getMessage('LOGIN_WRONG_ID');
- }
- break;
-
- default:
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unhandled error code %s detected.", $errorCode));
- $message .= getMessage('LOGIN_WRONG_ID');
- break;
- }
- $message .= "
+ // 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'] = ' |
+
+ ' . getMessageFromErrorCode($errorCode) . '
|
- |
-
\n";
- define('LOGIN_FAILURE_MSG', $message);
-} else {
- // No problems, no output
- define('LOGIN_FAILURE_MSG', '');
-}
+';
+} // END - if
// Display login form with resend-password form
-if (EXT_IS_ACTIVE('nickname')) {
- LOAD_TEMPLATE('guest_nickname_login');
+if (isExtensionActive('nickname')) {
+ loadTemplate('guest_nickname_login', false, $content);
} else {
- LOAD_TEMPLATE('guest_login');
+ loadTemplate('guest_login', false, $content);
}
// Was an URL constructed?
-if (!empty($URL)) {
+if (!empty($url)) {
// URL was constructed
- if (getTotalFatalErrors()) {
- // Fatal errors!
- loadIncludeOnce('inc/fatal_errors.php');
+ if (ifFatalErrorsDetected()) {
+ // Handle fatal errors
+ runFilterChain('handle_fatal_errors');
} else {
// Load URL
- redirectToUrl($URL);
+ redirectToUrl($url);
}
} // END - if
-//
+// [EOF]
?>