+ public $inviter_id;
+
+ function convertTo($target = false)
+ {
+ if(!$target){
+ return false;
+ }
+
+ $roo = HTML_FlexyFramework::get()->page;
+ $old = clone($this);
+ // this shold not really happen...
+ if($target->get('email', $this->email)){
+ return false;
+ }
+
+ $target->setFrom($this->toArray());
+
+ $target->insert();
+
+ $this->person_id = $target->id;
+ $this->person_table = $target->tableName();
+ $this->update($old);
+
+ if(!empty($this->inviter_id) && method_exists($target, 'createFriend')){
+ $target->createFriend($this->inviter_id);
+ }
+
+ return $target;
+ }