Add a 'where' clause to the auth_other_awl method.

This commit is contained in:
Andrew McMillan 2007-11-01 22:21:33 +13:00
parent 9b72812be7
commit b373f73ca1

View File

@ -145,7 +145,12 @@ EOERRMSG;
else
$cols = "*";
$qry = new PgQuery("SELECT $cols FROM usr WHERE lower(username) = ? ", strtolower($username) );
if ( isset($c->authenticate_hook['config']['where']) )
$andwhere = " AND ".$c->authenticate_hook['config']['where'];
else
$andwhere = "";
$qry = new PgQuery("SELECT $cols FROM usr WHERE lower(username) = ? $andwhere", strtolower($username) );
$qry->SetConnection($authconn);
if ( $qry->Exec('Login',__LINE,__FILE__) && $qry->rows == 1 ) {
$usr = $qry->Fetch();