@ Lisa
Boy, this was a head scratcher! Took me almost an hour to track the issue, find the cause and the solution. This is a little techincal, I’ll try to keep it as brief and concise as possible.
The issue, the core WP function is_user_logged_in() was returning true regardless if you are logged or not.
The cause is SeedProd Coming Soon Pro. When you visit the Bypass URL (something I did not realize I had to do when I was viewing in other browsers) it sets an authentication cookie. This cookie tells WordPress that the current user is logged even if no user is actually logged in.
Connections uses is_user_logged_in() uses to determine if the address, phone, email, etc should be displayed. But it also uses the core WP function current_user_can() which reads the current logged in user’s capabilities which can only be read for a user who is actually logged in. This is the secure way of doing things.
Since capabilities can only be read of an actual logged user the display of address, phone, email, etc was being hidden — as it should be. Really, none of the entries should have been displayed either, so that is a bug in Connections. One, I’ll have to address.
You can test this… here’s how:
- Go to the SeedProd Coming Soon Pro Settings page.
- Set the Status to Disabled.
- Open a Private/Incognito. Now view your directory, do not log in. The info will display while not logged in. It is important to use a private browsing window due to the authentication cookie still being set in your regular browser session. You would have to clear your cookies to get rid it (closing all browser windows should do the trick too since it is a session cookie).
The solution, honestly, I do not have one other than the issue will go away when you stop using SeedProd Coming Soon Pro.
This is definitely not a bug in Connections. Not sure if it is a bug or feature in SeedProd Coming Soon Pro. I’m kind of leaning towards the later because is_user_logged_in() should not return true if there is not a user logged in. This is a commonly used core WP function so I would expect other oddities to occur in other plugins which use it too.
So, this would explain why it seemed very inconsistent whether the details were shown or not. One would not typically look for authentication cookies.
I hope this makes sense and is not confusing. If you have any question about what I’ve explained, please ask.
