getCriteria not working as expected with boolean field types
I believe this should work (not tested):

$criteria-&gt;setAttribute('denied', 'not 1');


As when using the ElementCriteriaModel in Twig, you can't directly check for "falsey" values.