From: Chris Sharp Date: Wed, 30 Nov 2016 12:27:35 +0000 (-0500) Subject: Fixing query up to make it work. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c04adbb5a76f5963ef97bb1b8ae8c0fc0424f607;p=contrib%2Fpines%2Freport-creator.git Fixing query up to make it work. Signed-off-by: Chris Sharp --- diff --git a/models/user.class.php b/models/user.class.php index e4d130e..127f9bb 100644 --- a/models/user.class.php +++ b/models/user.class.php @@ -19,7 +19,9 @@ class user extends db function validateUserCredentials($userName, $password) { try { - $query = 'select id, home_ou, profile, first_given_name, family_name, email from actor.usr usr where usrname=:usrname and (actor.verify_passwd(usr.id, ''main'', md5((select salt from actor.passwd where usr = usr.id) || md5(:passwd)))) and active=true'; + $query = 'select id, home_ou, profile, first_given_name, family_name, email from actor.usr + where usrname=:usrname and (actor.verify_passwd(usr.id, \'main\', md5((select salt from + actor.passwd where usr = usr.id) || md5(:passwd)))) = true and active=true'; $params = array("usrname"=>$userName, "passwd"=>$password); $user = $this->executeQuery($query, $params, QR_QUERY_RETURN_ONE_ROW); }