Guardian
has two verrrry similarly named predicates: anonymous?
and is_anonymous?
What is the difference?
Guardian
has two verrrry similarly named predicates: anonymous?
and is_anonymous?
What is the difference?
I agree, this can be confusing.
anonymous?
means that the user hasnāt logged in, so itās an anonymous user browsing the site.
Thereās an old feature that allows users to switch to an āanonymousā user account. Using anonymous mode to reply or create topics
is_anonymous?
means that the user has switched into that mode.
Ah-haā¦
Perhaps it would be better to rename is_anonymous?
to is_user_in_anonymous_mode?
?
I guarantee there is at least one permissions-related bug already hiding in the codebase because someone mistakenly used the wrong methodā¦