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

Commit 4e52f9df authored by jurgbohn's avatar jurgbohn

Fixed recovery-table and now display error.tpl in web/recovery.php

parent a7713fbc
......@@ -169,7 +169,8 @@ if (isset($_POST['install'])) {
username VARCHAR(64),
email VARCHAR(255),
code VARCHAR(32),
int expires);");
expires int,
PRIMARY KEY(username));");
// uncomment these to solve performance problems with getRecentScrobbles
// $res = $mdb2->exec("CREATE INDEX album_artistname_idx ON Album(artist_name)");
......
......@@ -65,13 +65,14 @@ if (isset($_GET['code'])) {
if (isset($_POST['recover']) && isset($_POST['user'])) {
$username = $_POST['user'];
$res = $mdb2->query("SELECT * FROM Users WHERE username='"
$res = $mdb2->query("SELECT * FROM 'Users' WHERE username='"
. $mdb2->quote($username, 'text') . "'");
if (PEAR::isError($res) || $res->numRows() == 0) {
$errors .= "User not found.\n";
$smarty->assign('errors', $errors);
$smarty->assign('error.tpl');
$smarty->display('error.tpl');
die();
} else {
$row = $res->fetchOne(MDB2_FETCHMODE_ASSOC);
......
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