• Is there a function equivalent to current_user_can but not for current users but for certain users?

    Something like user_can($userID, 'delete_posts') or specific_user_can($userID, 'delete_posts')

Viewing 1 replies (of 1 total)
  • You can do the following to set the current user using a specific user’s ID:

    wp_set_current_user($post['user_ID']);

    If you do that before calling current_user_can() you should be golden. Not sure if you should unset it afterwards or not, though.

Viewing 1 replies (of 1 total)
  • The topic ‘Is there a function like SPECIFIC_USER_CAN()?’ is closed to new replies.