Quote:
Originally Posted by digitalSite
Anyone know how to make the referral link in registration required or at least to not allow people signing up who were not referred?
I would like to also prevent someone from stealing an email with a referral link and trying to sign up that way. Basically, I only want intended recipients accessing the referral link and not someone else.
Any ideas or help on this?? ANY suggestions is GREATLY appreciated. Thanks!
|
To require referrals, edit register.php and find this code:
PHP Code:
if ($_POST['referrername'])
{
if (!$testreferrerid = $DB_site->query_first("SELECT userid FROM " . TABLE_PREFIX . "user WHERE username = '" . addslashes(htmlspecialchars_uni($_POST['referrername'])) . "'"))
{
eval('$errors[130] = "' . fetch_phrase('badreferrer', PHRASETYPEID_ERROR) . '";');
}
}
add this after it:
PHP Code:
else
{
$errors[131] = 'You must be referred by an existing user to register';
}
Untested though.