Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#7446 closed defect (bug) (no action required)

Logged in users redirected away from the register page

Reported by: henry.wright Owned by:
Priority: normal Milestone:
Component: Core Version:
Severity: normal 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
10 years ago

  • Keywords needs-patch good-first-bug added
  • Milestone Awaiting ReviewFuture Release

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

#2 @henry.wright
10 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
10 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
10 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 task is to hunt down that redirect.

I think this is my problem, so feel free to close the ticket. Thanks again for your replies

Last edited 10 years ago by henry.wright (previous) (diff)

#5 @slaFFik
10 years ago

  • Milestone Future Release
  • Resolutioninvalid
  • Status newclosed

Closing the ticket as per request of the reporter.

Note: See TracTickets for help on using tickets.