X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2FCore_person_signup.php;h=4203051bc3e1205e2be34db066b420fa4794a50a;hb=4b48d8dc5ac45309c8ecd8595284d80ada27d59e;hp=2b887cdc540280eb8f6b3fb685ab66ee7a019bd8;hpb=4ab64042945702c5e42843617623c9672b59eedd;p=Pman.Core
diff --git a/DataObjects/Core_person_signup.php b/DataObjects/Core_person_signup.php
index 2b887cdc..4203051b 100644
--- a/DataObjects/Core_person_signup.php
+++ b/DataObjects/Core_person_signup.php
@@ -38,8 +38,8 @@ class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
// copy into person or other entity...
// and delete....
//$this->whereAdd("verify_key = '".$key."'");
- if($this->get("verify_key",$key)){
- $row = $this->fetch();
+ $row = $this->get("verify_key",$key);
+ if(!empty($row)){
$p = DB_DataObject::factory('person');
$p->honor = $row->honor;
$p->name = $row->name;
@@ -60,7 +60,23 @@ class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
$_SESSION['Hydra']['authUser'] = $p ? serialize($p) : false;
//mail pwd
- mail();
+ $htmlStr = "";
+ $htmlStr .= "Dear ".$p->honor.".".$p->lastname."
";
+ $htmlStr .= "Congratulations on Joining HydRa.
"
+ $htmlStr .= "If you need to access the system again please log in using the password ";
+ $htmlStr .= $temp_pwd;
+
+ $name = "Roojs";
+ $email_sender = "no-reply@roojs.com";
+ $subject = "Congratulations";
+ $recipient_email = $p->email;
+
+ $headers = "MIME-Version: 1.0\r\n";
+ $headers .= "Content-type: text/html; charset=utf-8\r\n";
+ $headers .= "From: {$name} ";
+ $headers .= "<";
+ $headers .= $email_sender;
+ $headers .= ">\r\n";
}else{
error_log("db insert error");