database.php edited online with Bitbucket

This commit is contained in:
Joseph Mikel Keller 2017-04-14 19:08:08 +00:00
parent b490cdf124
commit 9513389e0a

View File

@ -48,7 +48,7 @@ function VerifyUser($dataConnection, $username, $password)
$statement->bind_result($id, $storedPasshash, $salt); $statement->bind_result($id, $storedPasshash, $salt);
if(!$statement->fetch()) if(!$statement->fetch())
{ {
throw new Exception(__FUNCTION__ . " failed."); throw new Exception("Incorrect username.");
} }
$saltedPassword = $password . $salt; $saltedPassword = $password . $salt;
@ -56,7 +56,7 @@ function VerifyUser($dataConnection, $username, $password)
if($hashedPassword !== $storedPasshash) if($hashedPassword !== $storedPasshash)
{ {
throw new Exception(__FUNCTION__ . " failed."); throw new Exception("Incorrect password.");
} }
return $id; return $id;