4 * Table Definition for Person
6 require_once 'DB/DataObject.php';
8 class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
11 /* the code below is auto generated do not remove the above tag */
13 public $__table = 'core_person_signup'; // table name
14 public $id; // int(11) not_null primary_key auto_increment
15 public $email; // string(128) not_null
16 public $name; // string(128) not_null
17 public $firstname; // string(128) not_null
18 public $lastname; // string(128) not_null
19 public $firstname_alt; // string(128) not_null
20 public $lastname_alt; // string(128) not_null
21 public $honor; // string(128) not_null
22 public $verify_key; // int(11)
24 public $created_dt; // datetime(19) binary
33 function convertTo($target = false)
39 $roo = HTML_FlexyFramework::get()->page;
41 // this shold not really happen...
42 if($target->get('email', $this->email)){
44 $this->person_id = $target->id;
45 $this->person_table = $target->tableName();
51 $target->setFrom($this->toArray());
55 $this->person_id = $target->id;
56 $this->person_table = $target->tableName();
59 if(!empty($this->invite_id) && !empty($this->invite_table)){
60 $friend = DB_DataObject::factory($this->invite_table);
61 $friend->setFrom(array(
62 'person_id' => $this->invite_id,
63 'friend_id' => $target->id
72 function sendVerification($template, $roo)
76 'template' => $template,
78 'serverName' => $_SERVER['SERVER_NAME'],
79 'baseURL' => $roo->baseURL
82 $sent = DB_DataObject::factory('core_email')->send($content);
84 if(!is_object($sent)){
91 function getEmailFrom()
93 if (empty($this->name)) {
96 return '"' . addslashes($this->name) . '" <' . $this->email . '>';