Typo 'referral'->'referal' fixed, more 'empty version' fixed
[mailer.git] / inc / wrapper-functions.php
index aa7b6a0218667ddee3c6af8257d6c3e5232d826f..9d61c0cf94b87eff600170d7aa895944e83ddc34 100644 (file)
@@ -728,8 +728,11 @@ function getUserData ($column) {
 
 // Geter for whole user data array
 function getUserDataArray () {
+       // User id should not be zero
+       if (getCurrentUserId() == 0) debug_report_bug('User id is zero.');
+
        // Get the whole array
-       return $GLOBALS['user_data'];
+       return $GLOBALS['user_data'][getCurrentUserId()];
 }
 
 // Checks if the user data is valid, this may indicate that the user has logged