Hi Brajesh,
I have just updated to Visibility Manager 1.3.1 – a click on a member with hidden profile now redirects to home (at least on my site), what’s confusing. With versions <1.3.1 one was not redirected but still in /members after a click……from my point of view the best solution would be to suppress the link on username in /members if the users profile is hidden.
Hi Hans,
You are right about the issue. The problem is earlier version was causing issues when profile was private and the user logged out from one of the public components of profile(e.g groups/friends).Redirected to the home of the site to make sure that there won’t be redirect loop. For example, if we redirect to members directory(easily doable, I will show below), and if the members directory is private, It may cause the redirect loop(will further depend on how the page privacy is setup).
There are multiple solutions:-
1. If it is deemed fine, I can add an option in the admin to put the url of the page where the site admin wants the users to be redircted. Question is, should we have 1 redirect option for all privacy or 1 for each level of privacy?2. Or, you can always put the following snippet in bp-custom.php and it will work.
function buddydev_profile_visibility_redirect_url( $redirect_location, $privacy, $referrer = '' ) { $redirect_location = "http://somesite.com/somepage"; return $redirect_location; } add_filter( 'bp_profile_visibility_redirect_location', 'buddydev_profile_visibility_redirect_url', 10, 3 );
Please do let me know what do you think is the right way.
Thank you
BrajeshHi Brajesh,
Thanks for your explanation. For now I have added your code snippet. For my case the best solution would be to do a “non-redirect” for hidden profiles. Please check…
https://www.lerngruppen.net/groups/medienpaedagogik/members/
…and click on “Max M”. His profile is hidden, that way a redirect to /members happens based on your code snippet. Better would be to stay in that group members directory and not to go away to the global members directory – other words: to keep the current view.Anyway, to have an option in admin would be great…
Hi Hans,
The non redirect is doable but will be a bad idea performance wise. We will need to filter on the user urls and set them to ‘#’ but that is very inefficient in my personal view.I will add the redirect url option in settings in next update.
Thank you
Brajesh
You must be logged in to reply to this topic.