WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 7 months ago

#25407 closed enhancement (duplicate)

WordPress Multisite, Allow registration on each individual blog

Reported by: xparham Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords:
Focuses: Cc:

Description

On a multisite setup, all registration requests are redirected to wp-signup.php on main blog. But there are some situations that you might want to allow users to register on each individual blog and not through wp-signup.php. (e.g. multiple client sites with domains mapped to a blog on WMPU)

See this discussion on WPSE: http://wordpress.stackexchange.com/questions/26829/wordpress-multisite-how-to-keep-user-on-subdomain-throughout-registration-proce

In my case, because we had some custom plugins tightly integrated with WordPress default login/registration system which enables login with social networks, register with password and custom roles, email activation and ..., I ended up in a simple hack to wp-login.php which disable the redirect to wp-signup.php

I see no reason to not allow developers to change this default behavior via a simple filter. Please find a patch attached.

Attachments (1)

25407.patch (447 bytes) - added by xparham 7 months ago.

Download all attachments as: .zip

Change History (4)

xparham7 months ago

comment:1 follow-up: jeremyfelt7 months ago

The filter wp_signup_location is available to provide a custom signup URL. This is used when the link is output in wp-login.php.

#17630 is an open ticket with patch to make use of that filter to redirect when wp-signup.php is accessed directly. Not sure this ticket is an exact duplicate of that, though I think the pieces to make this happen are already in place.

comment:2 in reply to: ↑ 1 xparham7 months ago

Replying to jeremyfelt:

The filter wp_signup_location is available to provide a custom signup URL. This is used when the link is output in wp-login.php.

#17630 is an open ticket with patch to make use of that filter to redirect when wp-signup.php is accessed directly. Not sure this ticket is an exact duplicate of that, though I think the pieces to make this happen are already in place.

I believe that is something different. I'd like to keep user on wp-login.php?action=register, but with the filter wp_signup_location, this will make a redirect loop, right?

comment:3 jeremyfelt7 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from trunk to 3.0

Thanks for the clarification, xparham.

I'm going to close this as a duplicate of #23349, which suggested the same approach you have in your patch. I'll leave comments there as well. Please feel free to reopen that ticket if you'd like to discuss further.

Note: See TracTickets for help on using tickets.