X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-login.php;h=e8b3dfc6a9206d1c33318f01348ad774892f45ef;hb=2bda7ccdfd87b065a61ff976b5f9e98e46f73591;hp=0b6002d9ce7d294b6d4c568aec1dc22ba3fc7047;hpb=a954ccdf4aba81ec0e75a1836aa4bc14cb245aba;p=mailer.git diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 0b6002d9ce..e8b3dfc6a9 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -11,7 +11,12 @@ * Kurzbeschreibung : Loginbereich (leitet an das richtige Lgin-Modul * * weiter) * * -------------------------------------------------------------------- * - * * + * $Revision:: 856 $ * + * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: stelzi $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -37,7 +42,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("user")) && (!IS_ADMIN())) { - addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "user"); + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user"); return; } @@ -58,46 +63,46 @@ $ADD = ""; if ((!empty($GLOBALS['userid'])) && (isSessionVariableSet('u_hash'))) { // Maybe, then continue with it $uid = $GLOBALS['userid']; -} elseif ((!empty($_POST['id'])) && (!empty($_POST['password'])) && (isset($_POST['ok']))) { +} elseif ((REQUEST_ISSET_POST(('id'))) && (REQUEST_ISSET_POST(('password'))) && (IS_FORM_SENT())) { // Set userid and crypt password when login data was submitted - if ((EXT_IS_ACTIVE("nickname")) && (NICKNAME_PROBE_ON_USERID($_POST['id']))) { + if ((EXT_IS_ACTIVE("nickname")) && (NICKNAME_PROBE_ON_USERID(REQUEST_POST('id')))) { // Nickname entered - $uid = SQL_ESCAPE($_POST['id']); + $uid = SQL_ESCAPE(REQUEST_POST('id')); } else { // Direct userid entered - $uid = bigintval($_POST['id']); + $uid = bigintval(REQUEST_POST('id')); } -} elseif (!empty($_POST['new_pass'])) { +} elseif (REQUEST_ISSET_POST(('new_pass'))) { // New password requested $uid = 0; - if (!empty($_POST['id'])) $uid = $_POST['id']; + if (REQUEST_ISSET_POST(('id'))) $uid = REQUEST_POST('id'); } else { // Not logged in $uid = 0; $hash = ""; } // Set unset variables -if (empty($_POST['new_pass'])) $_POST['new_pass'] = ""; -if (empty($_GET['login'])) $_GET['login'] = ""; +if (!REQUEST_ISSET_POST(('new_pass'))) REQUEST_SET_POST('new_pass', ""); +if (!REQUEST_ISSET_GET(('login'))) REQUEST_SET_GET('login' , ""); if (IS_MEMBER()) { // Login immidiately... $URL = "modules.php?module=login"; -} elseif ((isset($_POST['ok'])) && ("".$uid."" != "".$_POST['id']."")) { +} elseif ((IS_FORM_SENT()) && ("".$uid."" != "".REQUEST_POST('id')."")) { // Invalid input (no nickname extension installed but nickname entered) - $ERROR = constant('CODE_EXTENSION_PROBLEM'); -} elseif (isset($_POST['ok'])) { + $ERROR = getCode('EXTENSION_PROBLEM'); +} elseif (IS_FORM_SENT()) { // Try the login (see inc/libs/user_functions.php) - $URL = USER_DO_LOGIN($_POST['id'], $_POST['password']); -} elseif ((!empty($_POST['new_pass'])) && (isset($uid))) { + $URL = USER_DO_LOGIN(REQUEST_POST('id'), REQUEST_POST('password')); +} elseif ((REQUEST_ISSET_POST(('new_pass'))) && (isset($uid))) { // Try the userid/email lookup (see inc/libs/user_functions.php) - $ERROR = USER_DO_NEW_PASSWORD($_POST['email'], $uid); + $ERROR = USER_DO_NEW_PASSWORD(REQUEST_POST('email'), $uid); } // Login problems? -if (!empty($_GET['login'])) { +if (REQUEST_ISSET_GET(('login'))) { // Use code from URL - $ERROR = SQL_ESCAPE($_GET['login']); + $ERROR = REQUEST_GET(('login')); } // END - if // Login problems? @@ -109,27 +114,27 @@ if (!empty($ERROR)) { "; switch ($ERROR) { - case constant('CODE_WRONG_PASS'): + case getCode('WRONG_PASS'): $MSG .= getMessage('LOGIN_WRONG_PASS'); break; - case constant('CODE_WRONG_ID'): + case getCode('WRONG_ID'): $MSG .= getMessage('LOGIN_WRONG_ID'); break; - case constant('CODE_ID_LOCKED'): + case getCode('ID_LOCKED'): $MSG .= getMessage('LOGIN_ID_LOCKED'); break; - case constant('CODE_ID_UNCONFIRMED'): + case getCode('ID_UNCONFIRMED'): $MSG .= getMessage('LOGIN_ID_UNCONFIRMED'); break; - case constant('CODE_NO_COOKIES'): + case getCode('NO_COOKIES'): $MSG .= getMessage('LOGIN_NO_COOKIES'); break; - case constant('CODE_EXTENSION_PROBLEM'): + case getCode('EXTENSION_PROBLEM'): if (IS_ADMIN()) { $MSG .= sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "nickname"); } else {