projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DataObjects/Core_person_signup.php
[Pman.Core]
/
DataObjects
/
Core_person_signup.php
diff --git
a/DataObjects/Core_person_signup.php
b/DataObjects/Core_person_signup.php
index
e5d3705
..
791b4cf
100644
(file)
--- a/
DataObjects/Core_person_signup.php
+++ b/
DataObjects/Core_person_signup.php
@@
-95,19
+95,28
@@
class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
// }
// }
// }
// }
- function
verified(
)
+ function
convertTo($target = false
)
{
{
- $hydra_person = DB_DataObject::factory('hydra_person');
+ if(!$target){
+ return false;
+ }
+
+ $roo = HTML_FlexyFramework::get()->page;
- if($
hydra_person
->get('email', $this->email)){
- return $
hydra_person
;
+ if($
target
->get('email', $this->email)){
+ return $
target
;
}
}
- $hydra_person->setFrom($this->toArray());
- $hydra_person->employer_name = $this->company_name;
+ $target->setFrom($this->toArray());
+
+ $target->insert();
+
+ $this->person_id = $target->id;
+ // ok - deleting might not be a great idea.... - as we can not track already confirmed codes..
+
+ //$this->delete();
- $hydra_person->insert();
- $hydra_person->onInsert(array(), $this);
+ return $target;
}
function sendVerification($template, $roo)
}
function sendVerification($template, $roo)
@@
-126,7
+135,7
@@
class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
return true;
}
return true;
}
- return
false
;
+ return
$sent
;
}
function getEmailFrom()
}
function getEmailFrom()