user_can() not working for comment authors
-
30-10-2019 - |
题
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?
没有正确的解决方案