Opened 9 years ago
Last modified 3 years ago
#35422 new enhancement
only exit if the redirect is true when registering on multisites
Reported by: | pbearne | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Login and Registration | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
in wp-login.php we do a redirect to (wp_signup_location wp-signup.php) when registering on multi sites and die
we should only die if the redirect is true
I also want to this patch added to save me from having to edit a core file inorder to install s2member on multisite
This plugin has install instructions that have us rem out the redirect and exit
`
<?php case 'register' : if ( is_multisite() ) { $sign_up_url = network_site_url( 'wp-signup.php' ); // Multisite uses wp-signup.php // Modified for full plugin compatiblity. //wp_redirect( apply_filters( 'wp_signup_location', $sign_up_url ) ); //exit; }
`
I would like to change this to use the filter to remove the location and cause the wp_redirect to return false
Attachments (4)
Change History (15)
#5
@
9 years ago
- Keywords dev-feedback removed
This is a duplicate of #23349, which was closed as invalid, though possibly due to a lack of discussion.
I'm still wary of this as a method to allow user registration at the individual site level of a network and would rather see plugins create a registration form. It seems like something could also be done using the login_form_register
action rather than by editing core files.
#6
@
9 years ago
My main aim here to remove the need to patch core
Let do some more digging as to what the plugin is doing
#7
@
9 years ago
I'm the lead at s2Member. Thank you all for taking a look at this.
Without diving deep into the assortment of hooks/filters that s2Member uses to make this feasible, because it's not just this one in particular that is required for it all to come together; let me just say that what would really help is to give plugin developers a way to prevent this redirection and exit when desirable.
Here is what's in core right now.
<?php case 'register' : if ( is_multisite() ) { /** * Filter the Multisite sign up URL. * * @since 3.0.0 * * @param string $sign_up_url The sign up URL. */ wp_redirect( apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ) ); exit; }
Proposed addition of a new filter: require_wp_signup
<?php case 'register' : if ( apply_filters( 'require_wp_signup', is_multisite() ) ) { /** * Filter the Multisite sign up URL. * * @since 3.0.0 * * @param string $sign_up_url The sign up URL. */ wp_redirect( apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ) ); exit; }
#8
@
9 years ago
@JasWSInc I have added your suggested filter to the patch
Thank you for hoping in on these tickets I really what to get all the patchs ing so you can remove the need to patch core
Please look at the other ticket in the set to make sure that this will work for you.
Many thanks paul
This ticket was mentioned in Slack in #core by chriscct7. View the logs.
9 years ago
#10
@
9 years ago
- Milestone changed from Awaiting Review to Future Release
@pbearne In wp-login.php.3.patch: "the the"
patch