• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Gesior 2012] $reg_account->set does not work

ligus

New Member
Joined
Apr 26, 2010
Messages
253
Reaction score
0
Hey, in original script there were:
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?
 
Back
Top