I'm trying to do some capability checks on comment authors using the user_can() function, but for some reason it isn't working at all.
I have a custom capability setup with the Role Manager plugin called "read_citizen".
My check looks like this:
if(user_can($commentAuthor->user_id, 'read_citizen') {
//do stuff here
}
I have confirmed that the $commentAuthor object is set correctly.
Ideas?
true
? Also: by "nothing is returned", do you mean that the conditional returnsnull
, or that it returnsfalse
?current_user_can('read_citizen')
insteadnothing
does not exist. What does the function exactly return?FALSE
orNULL
or even something else?