Hey, in original script there were:
but setCustomField does not work:
I changed script to:
but now it does not save to database something :/ While I'm creating account and writing name of player who has persuaded me to create account here, then in database: account->referrer is "0" everywhere :/
I think that there is something wrong with "set", in Gesior2012 there is no "setCustomField", just
Any idea how to fix it?
Code:
if($config['site']['referrer'] && $reg_referrer != '')
$reg_account->setCustomField("referrer", $ref_check['account_id']);
but setCustomField does not work:
Code:
ObjectData::setCustomField - Field referrer does not exist in data / is not loaded. Cannot save it.
More info:
File: C:\xampp\htdocs\classes/objectdata.php Line: 63
File: C:\xampp\htdocs\pages/createaccount.php Line: 334
File: C:\xampp\htdocs\system/load.page.php Line: 7
File: C:\xampp\htdocs/index.php Line: 37
I changed script to:
Code:
if($config['site']['referrer'] && $reg_referrer != '')
$reg_account->set("referrer", $ref_check['account_id']);
but now it does not save to database something :/ While I'm creating account and writing name of player who has persuaded me to create account here, then in database: account->referrer is "0" everywhere :/
I think that there is something wrong with "set", in Gesior2012 there is no "setCustomField", just
Code:
$reg_account->setName($reg_name);
$reg_account->setPassword($reg_password);
$reg_account->setEMail($reg_email);
$reg_account->setGroupID(1);
$reg_account->setCreateDate(time());
$reg_account->setCreateIP(Visitor::getIP());
$reg_account->setFlag(Website::getCountryCode(long2ip(Visitor::getIP())));
Any idea how to fix it?