Opened 8 years ago
Closed 8 years ago
#7446 closed defect (bug) (no action required)
Logged in users redirected away from the register page
Reported by: | henry.wright | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Core | Keywords: | needs-patch good-first-bug |
Cc: |
Description
Inside bp_core_screen_signup()
, logged in users are redirected away from the registration page. There's no way to stop this happening.
Would it be possible to have some control over this behaviour? In my case I don't want the redirect to happen.
Change History (5)
#1
@
8 years ago
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to Future Release
#2
@
8 years ago
I added a filter to toggle the redirect but that didn't stop the redirect. Scratching my head I then removed the redirect completely from the core file (just as a test). However, I still get redirected.
I think we can close this; there must be another redirect going on elsewhere in core. I'll need to investigate that
#3
@
8 years ago
Unhook bp_core_screen_signup()
and replace it with your own variant that does not perform the redirect.
We could also just have it log users out and prompt them to login again. It's worth revisiting this behavior, as it's been a very long time now that it's been this way.
#4
@
8 years ago
Hi @johnjamesjacoby
Unhooking bp_core_screen_signup()
was my first thought. When I tried it I got a Nginx server error. Scratched my head and at that point I opened this ticket.
add_action( 'bp_init', function() { remove_action( 'bp_screens', 'bp_core_screen_signup' ); } ); add_action( 'bp_screens', 'my_core_screen_signup' ); function my_core_screen_signup() { // Copy of bp_core_screen_signup()'s content here. }
Just as a test, if I modify bp_core_screen_signup()
directly to remove the redirect, the redirect still happens which suggests there's a redirect elsewhere in BP core. My next step is to try to find out what else is redirecting logged in users away from the registration page.
I think this is my problem, so feel free to close the ticket. Thanks again for your replies
I think this is probably OK behavior for most sites, but a filter or something would be fine.