X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-login.php;h=15863bb1f96a6cef28bd294766a9fba2cfcc65a0;hb=8d2c9b91eb82ea74fac58b2541982f760d0f77fc;hp=94904e1be4459483357de4321a660e83b2585e9a;hpb=1948097c5ce99a970622d74d28c6ec83bf31f8af;p=mailer.git diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 94904e1be4..15863bb1f9 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -15,10 +15,9 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,7 +39,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Add description as navigation point addMenuDescription('guest', __FILE__); @@ -54,26 +53,35 @@ if ((!isExtensionActive('user')) && (!isAdmin())) { $errorCode = '0'; $userid = false; $hash = ''; -$URL = ''; +$url = ''; $add = ''; // Already logged in? if ((isMemberIdSet()) && (isSessionVariableSet('u_hash'))) { // Maybe, then continue with it $userid = getMemberId(); -} elseif ((isPostRequestElementSet('id')) && (isPostRequestElementSet('password')) && (isFormSent())) { +} elseif ((isPostRequestParameterSet('id')) && (isPostRequestParameterSet('password')) && (isFormSent())) { // Set userid and crypt password when login data was submitted - if ((isExtensionActive('nickname')) && (isNicknameUsed(postRequestElement('id')))) { + if (isExtensionActive('nickname')) { // Nickname entered - $userid = SQL_ESCAPE(postRequestElement('id')); + $userid = SQL_ESCAPE(postRequestParameter('id')); } else { // Direct userid entered - $userid = bigintval(postRequestElement('id')); + $userid = bigintval(postRequestParameter('id')); } -} elseif (isPostRequestElementSet('new_pass')) { +} elseif (isPostRequestParameterSet('new_pass')) { // New password requested $userid = '0'; - if ((isPostRequestElementSet('id')) && (postRequestElement('id') > 0)) $userid = bigintval(postRequestElement('id')); + if (isPostRequestParameterSet('id')) { + // Do we have nickname or userid? + if ((isExtensionActive('nickname')) && (isNicknameUsed(postRequestParameter('id')))) { + // Nickname entered + $userid = SQL_ESCAPE(postRequestParameter('id')); + } else { + // Direct userid entered + $userid = bigintval(postRequestParameter('id')); + } + } // END - if } else { // Not logged in $userid = '0'; $hash = ''; @@ -81,22 +89,22 @@ if ((isMemberIdSet()) && (isSessionVariableSet('u_hash'))) { if (isMember()) { // Login immidiately... - $URL = 'modules.php?module=login'; -} elseif ((isFormSent()) && ('' . $userid . '' != '' . postRequestElement('id') . '')) { + $url = 'modules.php?module=login'; +} elseif ((isFormSent()) && ('' . $userid . '' != '' . postRequestParameter('id') . '')) { // Invalid input (no nickname extension installed but nickname entered) $errorCode = getCode('EXTENSION_PROBLEM'); } elseif (isFormSent()) { // Try the login (see inc/libs/user_functions.php) - $URL = doUserLogin(postRequestElement('id'), postRequestElement('password')); -} elseif ((isPostRequestElementSet('new_pass')) && (isset($userid))) { + $url = doUserLogin(postRequestParameter('id'), postRequestParameter('password')); +} elseif ((isPostRequestParameterSet('new_pass')) && (isset($userid))) { // Try the userid/email lookup (see inc/libs/user_functions.php) - $errorCode = doNewUserPassword(postRequestElement('email'), $userid); + $errorCode = doNewUserPassword(postRequestParameter('email'), $userid); } // Login problems? -if (isGetRequestElementSet('login')) { +if (isGetRequestParameterSet('login')) { // Use code from URL - $errorCode = getRequestElement('login'); + $errorCode = getRequestParameter('login'); } // END - if // No problems, no output by detault @@ -104,21 +112,18 @@ $content['message'] = ''; // Login problems? if (!empty($errorCode)) { - // @TODO Move this HTML code into a template - $message = "