From 3318e0b396709ab4500c690aca8cf1b3917fa811 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 2 Mar 2015 16:56:23 +0800 Subject: [PATCH] DataObjects/Core_person_signup.php --- DataObjects/Core_person_signup.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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(); -- 2.39.2