Pannous

Pannous Commit Details

Date:2020-11-28 13:12:07 (9 months 22 days ago)
Author:Grégory Soutadé
Branch:master
Commit:cb40cf09f14cdedea567f66df588ad2889fe482b
Parents: a09ad458fd5ef879858ef93e1b4b748f231d2a37
Message:Use Auth::reset_password instead of Auth::change_password when reset password because the password we get from ->password is hashed and cannot be used as is

Changes:
Mfuel/app/classes/model/users.php (2 diffs)
Mfuel/app/views/all_lists.php (2 diffs)

File differences

fuel/app/classes/model/users.php
117117
118118
119119
120
121
122
120
121
123122
124123
125124
......
127126
128127
129128
129
130130
131
131
132
133
132134
133135
134136
{
$subject = "Pannous password reset";
$password = $this->generateRandomPassword();
Auth::change_password($this->password, $password, $this->email);
$password = Auth::reset_password($this->email);
$body = "Your new password is " . $password . "\n";
$target_headers = array();
array_push($target_headers, "Content-Type: text/plain");
Log::info("Reset password for " . $this->email);
Log::debug("New password " . $password);
mail($this->email, $subject, $body, implode("\r\n", $target_headers));
mail($this->email, $subject, $body, implode("\r\n", $target_headers));
return true;
}
public static function create_user($username, $password, $email, $group)
fuel/app/views/all_lists.php
88
99
1010
11
1112
1213
1314
......
3738
3839
3940
41
42
4043
4144
foreach($lists as $list)
{
echo "<div class=\"list\">";
echo "<div class=\"title\">";
echo $list->title;
echo "</div>";
echo Form::submit("submit", "Unsubscribe");
echo Form::close();
}
echo "</div>";
}
?>

Archive Download the corresponding diff file

Branches