public $verify_key; // int(11)
public $verified;
public $created_dt; // datetime(19) binary
+ public $company_name;
+ public $person_type;
// function verify($key)
// {
// }
// }
- function sendVerification($roo)
+ function verified()
{
+ $hydra_person = DB_DataObject::factory('hydra_person');
+ if($hydra_person->get('email', $this->email)){
+ return $hydra_person;
+ }
+
+ $hydra_person->setFrom($this->toArray());
+ $hydra_person->employer_name = $this->company_name;
+
+ $hydra_person->insert();
+
+ $this->delete();
+
+ return $hydra_person;
+ }
+
+ function sendVerification($template, $roo)
+ {
+
+ $content = array(
+ 'template' => $template,
+ 'person' => $this,
+ 'serverName' => $_SERVER['SERVER_NAME'],
+ 'baseURL' => $roo->baseURL
+ );
+
+ $sent = DB_DataObject::factory('core_email')->send($content);
+
+ if(!is_object($sent)){
+ return true;
+ }
+
+ return false;
+ }
+
+ function getEmailFrom()
+ {
+ if (empty($this->name)) {
+ return $this->email;
+ }
+ return '"' . addslashes($this->name) . '" <' . $this->email . '>';
}
}