- if ($ltype == 'BONUS') $sender = 0;
-
- // Is the user's ID unlocked?
- $result = SQL_QUERY_ESC("SELECT status, gender, surname, family, ref_payout FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1",
- array($url_userid), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
- // Load data
- list($status, $gender, $surname, $family, $ref_pay) = SQL_FETCHROW($result);
-
- // Free some memory
- SQL_FREERESULT($result);
-
- if ($status == 'CONFIRMED') {
- // Update last activity
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `last_online`=UNIX_TIMESTAMP(), `last_module`='mailid_top' WHERE `userid`=%s LIMIT 1",
- array($url_userid), __FILE__, __LINE__);
-
+ if ($data['link_type'] == 'BONUS') {
+ $data['sender'] = NULL;
+ } // END - if
+
+ // Is the user id valid?
+ if (fetchUserData($userId) === TRUE) {
+ // Is the user status CONFIRMED?
+ if (getUserData('status') == 'CONFIRMED') {