[buddypress-trac] [BuddyPress] #2647: bp_core_catch_uri redirects to root and doesn't pass referer for login redirect
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Fri Jan 7 16:47:03 UTC 2011
#2647: bp_core_catch_uri redirects to root and doesn't pass referer for login
redirect
-----------------------+-------------------------
Reporter: ethitter | Owner:
Type: defect | Status: new
Priority: major | Milestone: 1.4
Component: Core | Version:
Resolution: | Keywords: needs-patch
-----------------------+-------------------------
Comment (by rocketpoprich):
Ok so here is my work around. This fixes my particular grief with this
defect, but is not particularly kosher (modifying core plugin files, be
careful with your updates) so your mileage may vary.
In /wp-content/plugins/buddypress/bp-friends/bp-friends-notifications.php
edit the variable $all_requests_link on line 14. This is the link sent in
your friend requests e-mail that breaks if you are not logged in.
What you will attempt to do now is change this variable to include /wp-
login.php?redirect_to=the_link_you_want_to_login_redirect to. reauth=1 is
added in case the person is logged in, they will be redirected to the
correct place also and not bypassed.
In the end your line 14 variable $all_requests_link should read:
{{{ $all_requests_link = "http://www.yourdomain.com/wp-
login.php?reauth=1&redirect_to=".bp_core_get_user_domain( $friend_id ) .
BP_FRIENDS_SLUG . '/requests/'; }}}
Please change yourdomain.com in this variable to your actual domain.
Good luck and lets hope this defect gets fixed the right way, soon.
--
Ticket URL: <https://trac.buddypress.org/ticket/2647#comment:4>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list