From d1ef62bb6e880c786d5f573f908eac0ffd809d1e Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Tue, 29 Nov 2016 15:01:05 -0500 Subject: [PATCH] Modify auth query to accommodate new-style EG auth. Signed-off-by: Chris Sharp --- models/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.11.0