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

Commit e1bab332 authored by jurgbohn's avatar jurgbohn

Changed error handling

parent df0d7b74
......@@ -68,8 +68,8 @@ if (isset($_POST['recover']) && isset($_POST['user'])) {
$res = $mdb2->query("SELECT * FROM Users WHERE username='"
. $mdb2->quote($username, 'text') . "'");
if ($res->numRows() == 0) {
$errors .= "Invalid username.\n";
if (PEAR::isError($res) || $res->numRows() == 0) {
$errors .= "User not found.\n";
$smarty->assign('errors', $errors);
$smarty->assign('error.tpl');
die();
......
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