DataObjects/Core_person_signup.php
[Pman.Core] / DataObjects / Core_person_signup.php
index c95f534..417ea05 100644 (file)
@@ -93,9 +93,31 @@ class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
 //        }
 //    }
 
-    function sendVerification()
+    function sendVerification($roo)
     {
         
+        $content = array(
+            'template'      => 'CORE_PERSON_SIGNUP_VERIFICATION',
+            '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 . '>';
     }
 }