X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2FCore_person_signup.php;h=8280401a37e579195779cef7bdba447c953bdbcb;hb=71b79ff7af09995cf797ff973f8004c0d3dc8f0f;hp=884c6f8c53e2d6b4d86867410ddd1e45d38d3a67;hpb=87b006b92d931c3eaa55939a2b3e328b36e555ca;p=Pman.Core diff --git a/DataObjects/Core_person_signup.php b/DataObjects/Core_person_signup.php index 884c6f8c..8280401a 100644 --- a/DataObjects/Core_person_signup.php +++ b/DataObjects/Core_person_signup.php @@ -40,12 +40,7 @@ class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject $old = clone($this); // this shold not really happen... if($target->get('email', $this->email)){ - - $this->person_id = $target->id; - $this->person_table = $target->tableName(); - $this->update($old); - - return $target; + return false; } $target->setFrom($this->toArray()); @@ -56,14 +51,8 @@ class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject $this->person_table = $target->tableName(); $this->update($old); - if(!empty($this->invite_id) && !empty($this->invite_table)){ - $friend = DB_DataObject::factory($this->invite_table); - $friend->setFrom(array( - 'person_id' => $this->invite_id, - 'friend_id' => $target->id - )); - - $friend->insert(); + if(!empty($this->inviter_id) && method_exists($target, 'createFriend')){ + $target->createFriend($this->inviter_id); } return $target;