- if (EXT_IS_ACTIVE('country', true)) {
- // New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
- $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
- } else {
- // Old way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
- $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
- }
- $DATA = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
+ // Get user data
+ if (!fetchUserData(getMemberId())) {
+ // Something really bad happended
+ debug_report_bug('No user account ' . getMemberId() . ' found.');
+ } // END - if
+
+ // Get line
+ $content = merge_array($content, getUserDataArray());