[eluser]Sean Gates[/eluser]
Unfortunately you only get the field value, in your case the username, passed with the callback when using validation.
From the docs:
Quote:Note: You can also use any native PHP functions that permit one parameter.
Therefore, you can only have one parameter, not two.
You'll need to move the query logic into the index() function and check for the username/password credentials within the validation success block.