From: Roland Häder Date: Mon, 9 Nov 2009 03:08:40 +0000 (+0000) Subject: ext was missing, fixed error message X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=63b07092bbb543f9367800a84328b0cd6a9b251c;hp=0da4efca52cd97ed8b385d81ae03125698f55e93 ext was missing, fixed error message --- diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index e967ca4cf2..6fc8006e05 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -264,6 +264,7 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p $dmy = ''; $add = ''; $errorCode = '0'; + $ext = ''; // Add last_login if available $lastOnline = ''; @@ -287,6 +288,7 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p } elseif (isNicknameUsed($userid)) { // No nickname installed $errorCode = getCode('EXTENSION_PROBLEM'); + $ext = 'nickname'; } else { // Direct userid entered fetchUserData($userid); @@ -384,7 +386,7 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p // id not found! $errorCode = getCode('WRONG_ID'); } - } else { + } elseif ($errorCode == '0') { // id not found! $errorCode = getCode('WRONG_ID'); } @@ -393,6 +395,9 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p if ($errorCode > 0) { // Then reconstruct the URL $URL = $errorUrl . $errorCode; + + // Extension set? Then add it as well. + if (!empty($ext)) $URL .= '&ext=' . $ext; } // END - if // Return URL