In hook:
register_addmember_process
Quote:
if (($cybareg_tiinfo['inviter']>0) AND empty($userdata->errors))
{
$vbulletin->db->query_write(" UPDATE " . TABLE_PREFIX . "cyb_advreg_invite SET done = '1' WHERE id = '".$db->escape_string($cybareg_tiinfo['id'])."' ");
$cybareg_refinfo = $vbulletin->db->query_first("
SELECT username
FROM " . TABLE_PREFIX . "user AS user
WHERE userid = '".$db->escape_string($cybareg_tiinfo['inviter'])."'
");
$userdata->set('referrerid', $cybareg_refinfo['username']);
}
$db->show_errors();
|
It seem you missing the show error when no invitation/ invalid invitation code. So the registration process will continue going event I set the option "Only invited users can register".