From 9efd8a2f4b76d10ff1cc894c101c4315325dcacf Mon Sep 17 00:00:00 2001 From: ciruz Date: Wed, 13 Nov 2013 09:28:42 +0100 Subject: [PATCH] fixed send conformation email --- Honeypot/plugin.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Honeypot/plugin.php b/Honeypot/plugin.php index 859870c..bc89807 100644 --- a/Honeypot/plugin.php +++ b/Honeypot/plugin.php @@ -5,7 +5,7 @@ ET::$pluginInfo["Honeypot"] = array( "name" => "Honeypot", "description" => "Spam prevention with invisible form fields.", - "version" => "0.1", + "version" => "0.2", "author" => "ciruz", "authorEmail" => "me@ciruz.net", "authorURL" => "http://www.ciruz.net", @@ -79,7 +79,7 @@ public function userController_join($sender){ else { if (C("esoTalk.registration.requireEmailConfirmation")) { - $sender->sendConfirmationEmail($data["email"], $data["username"], $memberId.$data["resetPassword"]); + $this->sendConfirmationEmail($data["email"], $data["username"], $memberId.$data["resetPassword"]); $sender->renderMessage(T("Success!"), T("message.confirmEmail")); } @@ -99,4 +99,11 @@ public function userController_join($sender){ $sender->data("form", $form); $sender->render($this->getResource("join.php")); } + + protected function sendConfirmationEmail($email, $username, $hash){ + sendEmail($email, + sprintf(T("email.confirmEmail.subject"), $username), + sprintf(T("email.header"), $username).sprintf(T("email.confirmEmail.body"), C("esoTalk.forumTitle"), URL("user/confirm/".$hash, true)) + ); + } }