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; } $target->setFrom($this->toArray()); $target->insert(); $this->person_id = $target->id; $this->person_table = $target->tableName(); $this->update($old); // ok - deleting might not be a great idea.... - as we can not track already confirmed codes.. //$this->delete(); return $target; } 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 $sent; } function getEmailFrom() { if (empty($this->name)) { return $this->email; } return '"' . addslashes($this->name) . '" <' . $this->email . '>'; } }