From c4da963cdde2873cd862d43974f42f13a646dc2b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 14 Jan 2010 21:52:08 +0000 Subject: [PATCH] Possible fix for missing user_data array element --- inc/libs/user_functions.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index 709369f4ad..ef8c29fa96 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -290,9 +290,12 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p fetchUserData($userid); } - // Get user data array and set userid (e.g. important if we login with nickname) - $content = getUserDataArray(); - if (!empty($content['userid'])) $userid = bigintval($content['userid']); + // No error found? + if ($errorCode == '0') { + // Get user data array and set userid (e.g. important if we login with nickname) + $content = getUserDataArray(); + if (!empty($content['userid'])) $userid = bigintval($content['userid']); + } // END - if // Is there an entry? if ((isUserDataValid()) && (getUserData('status') == 'CONFIRMED') && (!empty($content['userid']))) { -- 2.39.5