// 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