We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit a8759281 authored by jurgbohn's avatar jurgbohn

Final fix on recovery, ready to move to stable (i hope)

parent dfec11a8
...@@ -61,12 +61,12 @@ if (isset($_GET['code'])) { ...@@ -61,12 +61,12 @@ if (isset($_GET['code'])) {
$content = "Hi!\n\nYour password has been set to " . $password . "\n\n - The Libre.fm Team"; $content = "Hi!\n\nYour password has been set to " . $password . "\n\n - The Libre.fm Team";
sendEmail($content, $email); sendEmail($content, $email);
$sql = "DELETE FROM Recovery_Request WHERE code=" . $mdb2->quote($_GET['code'], 'text'); $sql = "DELETE FROM Recovery_Request WHERE code=" . $mdb2->quote($email, 'text');
$mdb2->exec($sql); $mdb2->exec($sql);
$smarty->assign('changed', true); $smarty->assign('changed', true);
} }
if (isset($_POST['user'])) { else if (isset($_POST['user'])) {
$username = $_POST['user']; $username = $_POST['user'];
$res = $mdb2->query("SELECT * FROM Users WHERE username=" $res = $mdb2->query("SELECT * FROM Users WHERE username="
...@@ -100,7 +100,6 @@ if (isset($_POST['user'])) { ...@@ -100,7 +100,6 @@ if (isset($_POST['user'])) {
. $url . "\n\n- The Libre.fm Team"; . $url . "\n\n- The Libre.fm Team";
sendEmail($content, $row['email']); sendEmail($content, $row['email']);
$smarty->assign('sent', true); $smarty->assign('sent', true);
} }
$smarty->display("recovery.tpl"); $smarty->display("recovery.tpl");
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div id='invite'> <div id='invite'>
<form action='' method='post'> <form action='/recovery.php' method='post'>
<fieldset> <fieldset>
<p><a href='http://libre.fm' rel='bookmark' class='vcard fn org url'>libre.fm</a> Password Recovery</p> <p><a href='http://libre.fm' rel='bookmark' class='vcard fn org url'>libre.fm</a> Password Recovery</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