Skip to:
Content

BuddyPress.org

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: henrywright's profile 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 @boonebgorges
8 years ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to Future Release

I think this is probably OK behavior for most sites, but a filter or something would be fine.

#2 @henry.wright
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 @johnjamesjacoby
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 @henry.wright
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

Version 0, edited 8 years ago by henry.wright (next)

#5 @slaFFik
8 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

Closing the ticket as per request of the reporter.

Note: See TracTickets for help on using tickets.