Problem allowing logged in users
-
Hi,
I’m having some trouble granting access to logged in users to a site restricted by IP.I’m using WP 5.3.2 multisite setup and Restricted Site Access 7.2.0.
Initially one of the sites were restricted by IP, and restricted users are redirected to another URL. That’s working fine.
Now a set of network users need to access the site even from non-whitelisted IPs; since they are network users but may not be site users, I implemented the
restricted_site_access_user_can_access
filter shown in the FAQ (in a tiny mu-plugin), but it’s not working because the user ID when the filter is executed is always 0! (and yes, the user I’m testing with is already logged in beforehand).I have then tried the same but with an equivalent
restricted_site_access_is_restricted
filter; didn’t work either, but also, when logged in as super-admin, plugin settings are not shown correctly (none of the Site Visibility radio buttons is selected, so no other plugin options are shown). So finally I removed this filter.Then tried to change the Handle restricted visitors action to Send them to login page, but… they’re still redirected to the same URL I had setup earlier (I have also tried deleting the redirection URL before changing the action, but I’m getting always the same result).
I’m getting out of ideas, except, maybe, disable the plugin and just require all users to login, wherever they come from.
Regards,
Carlos
- The topic ‘Problem allowing logged in users’ is closed to new replies.