Skip to content

Commit

Permalink
fixed send conformation email
Browse files Browse the repository at this point in the history
  • Loading branch information
ciruz committed Nov 13, 2013
1 parent 38e0d6b commit 9efd8a2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Honeypot/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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" => "[email protected]",
"authorURL" => "http://www.ciruz.net",
Expand Down Expand Up @@ -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"));
}

Expand All @@ -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))
);
}
}

0 comments on commit 9efd8a2

Please sign in to comment.