DataObjects/Core_person_signup.php
authorAlan Knowles <alan@roojs.com>
Mon, 2 Mar 2015 08:56:23 +0000 (16:56 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 2 Mar 2015 08:56:23 +0000 (16:56 +0800)
DataObjects/Core_person_signup.php

index 6a2add2..af23ce6 100644 (file)
@@ -35,10 +35,14 @@ class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
         }
         
         $roo = HTML_FlexyFramework::get()->page;
         }
         
         $roo = HTML_FlexyFramework::get()->page;
-        
+        $old = clone($this);
         // this shold not really happen...
         if($target->get('email', $this->email)){
             
         // 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 $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->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();
         // ok - deleting might not be a great idea.... - as we can not track already confirmed codes..
         
         //$this->delete();