Landing page #15

Merged
PootisPenserHere merged 2 commits from landingPage into master 2018-08-12 02:06:14 +00:00
Showing only changes of commit 30f755c0b2 - Show all commits

View File

@ -41,6 +41,7 @@ class SessionApplication{
/** /**
* @param $userName string * @param $userName string
* @return mixed * @return mixed
* @throws Exception
*/ */
function getPassword($userName){ function getPassword($userName){
$this->asserts->isNotEmpty($userName, "The username can't be empty"); $this->asserts->isNotEmpty($userName, "The username can't be empty");
@ -51,7 +52,7 @@ class SessionApplication{
$stmt->execute(array(':userName' => $userName)); $stmt->execute(array(':userName' => $userName));
$results = $stmt->fetchAll(); $results = $stmt->fetchAll();
if(!$results){ if(!$results){
exit($this->databaseSelectQueryErrorMessage); throw new Exception('The user or password didnt match, please try again.');
} }
$stmt = null; $stmt = null;
return $results[0]['password']; return $results[0]['password'];