Commit ce244b8079ff733cbdf690ce5aa0be59159321d4

Authored by Neil Blakey-Milner
1 parent 4f13e9a9

Use DBUtil for this query, it was not database-portable previously.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3297 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/authentication/Authenticator.inc
@@ -40,7 +40,9 @@ class Authenticator { @@ -40,7 +40,9 @@ class Authenticator {
40 $aUserDetails = array(); 40 $aUserDetails = array();
41 41
42 // retrieve the userID 42 // retrieve the userID
43 - $iUserID = lookupID($default->users_table, "BINARY username", "$sUserName"); 43 + $sSQL = "SELECT id FROM $default->users_table WHERE username = ?";
  44 + $aParams = array($sUserName);
  45 + $iUserID = DBUtil::getOneResultKey(array($sSQL, $aParams), 'id');
44 if ($iUserID) { 46 if ($iUserID) {
45 $oUser = & User::get($iUserID); 47 $oUser = & User::get($iUserID);
46 48