kevinvess / wp-force-login

A simple lightweight WordPress plugin that requires visitors to log in to interact with the website.
Other
81 stars 34 forks source link

Works with Chrome, Firefox, and Edge on Windows 10, but not linux or Android #86

Open sootsnoot opened 1 month ago

sootsnoot commented 1 month ago

By not working on Linux (Zorin linux) or Android, I mean that I can go to the site and the home page is displayed, with the regular WordPress login button in the upper left corner. The site seems to work normally, login is not forced. By works on my PC, I mean that if I go there when not logged in, the login page is displayed, and I can't get to any other page until I successfully login.

I don't understand how this is possible, since login state is managed by cookies in the browser, the browser should work the same in that regard on all platforms.

What can I do to help debug this? I don't want to post the URL here because there can be phone numbers and email addresses there. Is there an email address where I could send the site url privately?

kevinvess commented 1 month ago

Force Login relies on the built-in WordPress function is_user_logged_in() to determine whether the current visitor is a logged in user and redirect them to the login screen.

Can you try testing a conditional statement using is_user_logged_in() function on Linux and Android to confirm that works for you?

I agree, the Force Login functionality should work on any browser regardless of your operating system. Let me know if you determine the cause of this issue. Good luck!