|
إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...
انضم الينا
#1
| ||
| ||
I am looking to modify a plugin that posts a new thread when a new member registers on our forums. I am placing this new thread in a separate section so that we can comment on these users before approving them for the forum. In this thread I want to include some information regarding fields they filled out during registration so I tried to do this: Code: $usercardata = $db->query_first(" SELECT u.field5 FROM " . TABLE_PREFIX . "useractivation AS ua LEFT JOIN " . TABLE_PREFIX . "userfield AS u USING (userid) WHERE ua.activationid = '" . $vbulletin->db->escape_string($vbulletin->GPC['i']) . "' AND ua.emailchange = 0 "); $usercar = $usercardata['field5']; $pagetext = str_replace('$usercar',htmlspecialchars_uni($vbull etin->userinfo['field5']), $pagetext); The above query (modified from the query below) returns a blank value. The code that the plugin creator users to grab the username is: Code: $userdata = $db->query_first(" SELECT u.username FROM " . TABLE_PREFIX . "useractivation AS ua LEFT JOIN " . TABLE_PREFIX . "user AS u USING (userid) WHERE ua.activationid = '" . $vbulletin->db->escape_string($vbulletin->GPC['i']) . "' AND ua.emailchange = 0 "); $username = $userdata['username']; $pagetext = str_replace('$username',htmlspecialchars_uni($vbul letin->userinfo['username']), $pagetext); Any idea what I am doing wrong or what needs to be fixed in order to do this correctly? Is there a better way to include User Registration fields IN post content? Thanks in advance. __DEFINE_LIKE_SHARE__ |
مواقع النشر (المفضلة) |
| |