From 63b07092bbb543f9367800a84328b0cd6a9b251c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 9 Nov 2009 03:08:40 +0000 Subject: [PATCH] ext was missing, fixed error message --- inc/libs/user_functions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.5