Thread Starter
mtp12
(@mtp12)
it returns the same whether the user object have the capability or not.
So it returns true or false, depending on if i write with “!” or without, for both the user with the capability, and the user without.
Thread Starter
mtp12
(@mtp12)
If i set up an if statement looking like this if(current_user_can(‘read_private_post’)){}
It do the same thing for all users. Either it will come back true, or false.
I have checked each user and see they have their capabilities still (using User Role Editor Plugin)
I have also checked the database to check if the problem was it not saving the meta data on each user object. But that looked fine aswell.
Thread Starter
mtp12
(@mtp12)
i have used if statements in functions.php where if(current_user_can(‘read_private_posts’) example.
This have worked great for some time. But suddenly today, it can no longer seem to regonize and user capability. So the if statement simply don’t work anymore.