I’m trying get a list of all users that do not have ticked a specific custom user field. I managed to get a list of those who have ticked it, but I can’t seem to do the inverse:
SELECT cf.user_id FROM user_custom_fields cf WHERE cf.name like 'user_field_5' AND cf.value = 'true'
cf.value = 'false' gives me an empty list, and so does
cf.value = '' and also
cf.value = 'null'.
BTW, I found it confusing that the datatype of a confirmation type user field is not boolean but text. I figure it’s to keep the user field table simple with just one data type?