From: Alan Knowles Date: Mon, 2 Mar 2015 08:56:23 +0000 (+0800) Subject: DataObjects/Core_person_signup.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=3318e0b396709ab4500c690aca8cf1b3917fa811 DataObjects/Core_person_signup.php --- diff --git a/DataObjects/Core_person_signup.php b/DataObjects/Core_person_signup.php index 6a2add20..af23ce6f 100644 --- a/DataObjects/Core_person_signup.php +++ b/DataObjects/Core_person_signup.php @@ -35,10 +35,14 @@ class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject } $roo = HTML_FlexyFramework::get()->page; - + $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; } @@ -48,7 +52,7 @@ class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject $this->person_id = $target->id; $this->person_table = $target->tableName(); - $this->update(); + $this->update($old); // ok - deleting might not be a great idea.... - as we can not track already confirmed codes.. //$this->delete();