Skip to content
Browse files

Accepting the parameter in both the functions

  • Loading branch information...
1 parent df850b7 commit 4e8fdea8743c3cc6a4d31f35568cd4137fb65a5c ibby923 committed Feb 10, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 inc/class.user.inc.php
View
8 inc/class.user.inc.php
@@ -123,7 +123,7 @@ private function sendVerificationMail($emailAddress, $username, $confirmCode){
- private function sendUpdatePassMail($emailAddress,$username,$confirmcode) {
+ private function sendUpdatePassMail($emailAddress,$username,$confirmcode,$sendUserTo) {
if(!($this->isUserActivated($username))) {
return "you have not been activated";
}
@@ -138,15 +138,15 @@ private function sendUpdatePassMail($emailAddress,$username,$confirmcode) {
$headers .= "X-Mailer: PHP v" .phpversion() . $eol;
$message = "Hello " . $username . ", <br />";
$message .= "Password update request <br />";
- $message .= "<a href='localhost/ForgotPass.php?newCode=".$confirmcode."> Please click on this link to change your password </a> <br />";
+ $message .= "<a href=".$sendUserTo.$confirmcode."> Please click on this link to change your password </a> <br />";
return @mail($to,$subject,$message,$headers);
}
}
//Change the code for the given email address, check if address is in use, if yes check if user is activated, if yes go thru, else fail
- public function changeCode($emailAddress) {
+ public function changeCode($emailAddress,$sendUserTo) {
if(($this->isEmailAddressInUse($emailAddress))) {
$checkUser = "SELECT userName FROM user WHERE email=:email";
try {
@@ -180,7 +180,7 @@ public function changeCode($emailAddress) {
$stmt->bindParam(":email", $emailAddress, PDO::PARAM_STR);
$stmt->bindParam(":code", $confirmCode, PDO::PARAM_STR);
$stmt->execute();
- if($this->sendUpdatePassMail($emailAddress, $username, $confirmCode)){
+ if($this->sendUpdatePassMail($emailAddress, $username, $confirmCode,$sendUserTo)){
return true;
}
else{

0 comments on commit 4e8fdea

Please sign in to comment.
Something went wrong with that request. Please try again.