Commit d6ddc4a3 authored by jurgbohn's avatar jurgbohn

Fixed actually resetting the password

parent cc0e6360
......@@ -41,7 +41,7 @@ if (isset($_GET['code'])) {
die();
}
$row = $res->fetchOne(MDB2_FETCHMODE_ASSOC);
$row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);
$password = "";
$chars = "abcdefghijklmnopqrstuvwxyz0123456789";
......@@ -59,7 +59,7 @@ if (isset($_GET['code'])) {
$content = "Hi!\n\nYour password has been set to " . $password . "\n\n - The Libre.fm Team";
sendEmail($content, $email);
$smarty->assign('sent', true);
$smarty->assign('changed', true);
}
if (isset($_POST['user'])) {
......
......@@ -6,6 +6,10 @@
<p id='errors'>{$errors}</p>
{/if}
{if isset($changed)}
<p>Your new password has been emailed to you.</p>
{/if}
{if isset($sent)}
<p>An email with further information has been sent to the email address associated with your profile.</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment