From: Roland Häder Date: Thu, 14 Jan 2010 21:52:08 +0000 (+0000) Subject: Possible fix for missing user_data array element X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=c4da963cdde2873cd862d43974f42f13a646dc2b Possible fix for missing user_data array element --- 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']))) {