From: Chris Sharp Date: Tue, 29 Nov 2016 20:01:05 +0000 (-0500) Subject: Modify auth query to accommodate new-style EG auth. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d1ef62bb6e880c786d5f573f908eac0ffd809d1e;p=contrib%2Fpines%2Freport-creator.git Modify auth query to accommodate new-style EG auth. Signed-off-by: Chris Sharp --- diff --git a/models/user.class.php b/models/user.class.php index 82a8cd6..e4d130e 100644 --- a/models/user.class.php +++ b/models/user.class.php @@ -19,7 +19,7 @@ class user extends db function validateUserCredentials($userName, $password) { try { - $query = 'select id, home_ou, profile, first_given_name, family_name, email from actor.usr where usrname=:usrname and passwd=md5(:passwd) and active=true'; + $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'; $params = array("usrname"=>$userName, "passwd"=>$password); $user = $this->executeQuery($query, $params, QR_QUERY_RETURN_ONE_ROW); }