0

After reading the Roles and Capabilities article I can see that the Subscriber role has read capabilities only. What capabilities (if any) would be assigned to an unauthenticated user? i.e. a website visitor browsing around but not logged-in.

2 Answers 2

1

Visitors have no capabilities. Not even the capability "read" which seems a bit odd to me.

3
  • 1
    According to Codex read gives most basic level of access to Dashboard, so it doesn't make sense for unregistered users either.
    – Rarst
    Nov 24, 2014 at 21:30
  • A I didn't check the codex for the read capability. Thought it would be something like read posts.
    – Horttcore
    Nov 25, 2014 at 15:58
  • This is incorrect. Jory Hogeveen's answer is correct.
    – John Dee
    Aug 30, 2020 at 21:49
1

Every user (loggedin or visitor) has the exist hardcoded capability.

https://developer.wordpress.org/reference/classes/wp_user/has_cap/

See line 745 in the source example.

Not logged in users have no other capabilities unless coded in a plugin or theme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.