public $person_id;
public $person_table;
+
+ public $inviter_id;
function convertTo($target = false)
{
$this->person_id = $target->id;
$this->person_table = $target->tableName();
$this->update($old);
- // ok - deleting might not be a great idea.... - as we can not track already confirmed codes..
- //$this->delete();
+ if(!empty($this->inviter_id) && method_exists($target, 'createFriend')){
+ $target->createFriend($this->inviter_id);
+ }
return $target;
}