Skip to content

Commit

Permalink
fix action_sendConfirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
skywalker512 committed Jul 12, 2018
1 parent 1752d9e commit 8a26230
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/controllers/ETUserController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function($form, $key, &$success) use ($controller)
$this->renderMessage("Error", sprintf(T("message.emailNotYetConfirmed"), URL("user/sendConfirmation/".$form->getValue("username"))));
return;
}

if (isset($form->errors["accountNotYetApproved"])) {
$this->renderMessage("Error", T("message.accountNotYetApproved"));
return;
Expand Down Expand Up @@ -325,9 +326,13 @@ public function action_sendConfirmation($username = "")

// Get the requested member.
$member = ET::memberModel()->get(array("m.username" => $username, "m.confirmed" => false))[0];
$member_mail = ET::memberModel()->get(array("m.email" => $username, "m.confirmed" => false))[0];
if ($member) {
$this->sendConfirmationEmail($member["email"], $member["username"], $member["memberId"].$member["resetPassword"]);
$this->renderMessage(T("Success!"), T("message.confirmEmail"));
} elseif ($member_mail) {
$this->sendConfirmationEmail($member_mail["email"], $member_mail["username"], $member_mail["memberId"].$member_mail["resetPassword"]);
$this->renderMessage(T("Success!"), T("message.confirmEmail"));
}
else $this->redirect(URL(""));
}
Expand Down

0 comments on commit 8a26230

Please sign in to comment.