If has_access = false in authorizer_has_access
-
Hi,
I am using the authorizer_has_access filter in functions.php to validate that a user is in a list of valid users to access a certain page of my website. If the user is logged in but is not in the list, I set has_access to false in the function that is called for the authorizer_has_access filter. I can see that my function is working correctly (based on printing to screen) in the function to determine whether the user should have access to the page, and it works correctly when has_access is set to true, to continue to show the page, but when has_access is false, I am getting a browser error ERR_TOO_MANY_REDIRECTS. I had thought either the plugin would redirect to a certain page (how do I specify what page?), or it would show an error message that you do not have access to view this page.
Is there another step I need to do to configure what happens when the user is logged in but does not have access to a page? I checked the Authorizer settings for anything like a page to show when access is denied, or a message to show, etc. and don’t see anything.
Thank you,
Colleen
- The topic ‘If has_access = false in authorizer_has_access’ is closed to new replies.