craft.users.admin boolean parameter... to quote or not to quote?
Let me try to make some sense of the behavior you’re seeing.

First, you should know that the admin param will query against the admin column in your craft_users table, which will either be set to 0 or 1 for each user.

Like most Craft params, the admin param is set to null by default, and will only have any affect on the DB query if it is set to a non-empty value. (Here’s a list of what PHP considers “empty”: http://php.net/manual/en/function.empty.php#refsect1-function.empty-returnvalues)

So, here’s what’s happening behind the scenes for each thing you passed in:


false – That’s an empty value, so it’s the same as not passing anything in.
'false' – Since the admin column is numeric, MySQL has to normalize this string into a number (sortof like using JavaScript’s parseInt() function). The result for 'false' is 0, since 'false' doesn’t begin with a number. The end result is that this awkwardly works as expected, but I wouldn’t recommend it.
'true' – Same effect as 'false'. Ends up being 0.
true – SQL doesn’t support PHP’s boolean datatypes (true/false), so PHP will convert this to 1 before passing it off to MySQL. (false likewise becomes 0, but since false is empty, Craft won’t let your value make it that far in the first place.)


In the future, I think this makes a good case for us allowing false, so we’ll probably start checking for that and allowing it. But that won’t help you today.

So the question is then, what is the best way to find users that are(n’t) admins today? Here’s what I would recommend:

Finding admins:


1 (int)
'1' (string)
true


Finding non-admins:


'not 1' (string)