Skip to:
Content
Pages
Categories
Search
Top
Bottom

wp-signup.php redirects to registration-slug – WHY???

  • Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    When on a subblog the registration-link in the buddy-bar points to wp-signup.php. Only in the root-blog (where BP resides) the link is directly to the registration-slug.

    My question: Is that on purpose? If so, why?

    I does not make sense to me (although I have no expertise). Why not using the link to the registration-slug. To me it seems like another door for spammers: I can’t delete/change wp-signup.php, because otherwise registration from subblogs does not work anymore.And spammers, who search for wp-signup.php are redirected to my custom-registration-slug – no matter what I choose there…

    I am pretty sure, that I get something wrong. But it would help, if someone could explain this to me :-), for right now, it doesn’t really make sense…

    Thanks already!

Viewing 14 replies - 1 through 14 (of 14 total)
  • Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    is that a stupid question (I am not sure myself), but maybe someone could assure me of it :-)

    Avatar of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    when you activate Buddypress, you enable this function

    function bp_get_signup_page() {

    global $bp; if ( bp_has_custom_signup_page() )

    $page = $bp->root_domain . '/' . BP_REGISTER_SLUG;

    else

    $page = $bp->root_domain . '/wp-signup.php';</p>

    return apply_filters( 'bp_get_signup_page', $page );

    }

    which redirects your wp-signup.php page to your BP_REGISTER_SLUG.

    in order to change that url slug ~ modify your register slug in your wp-config.php by adding this line.

    define( 'BP_REGISTER_SLUG', 'whatever_you_want_to_call_it_no_spaces_or_weird_characters' );

    above the line. /* That’s all, stop editing! Happy blogging. */

    Avatar of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    I just noticed I failed to read you entire question there. Correct, they will target wp-signup.php and you can modify this file name too, if you wish. It is a bit involved though and may I suggest this article if you would like detailed information about how to do so ~ http://wpmu.tripawds.com/2009/12/12/the-ongoing-fight-against-spam-blogs/

    keep in mind those instructions are for MU 2.8.6 and if you decide to edit wp-signup.php ~ don’t forget to change it in these places ~ wp-signup.php, wp-login.php,wpmu-settings.php and bp-core/bp-core-templatetags.php

    Avatar of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    .. and remember that anytime you ‘hack’ the core, you’ll eventually need to keep up with those edits for when it comes time to upgrade since many of those filenames are going to be changing in the upcoming 3.0 release.

    Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    Thanks – you are very helpful! :-)

    Do you know WHY it is important, that in Subblogs the wp-signup.php instead of the register-slug is called?

    Avatar of Andrea Rennick
    Andrea Rennick
    Participant

    @andrea_r

    Because you can’t sign up directly to a member blog in MU, you must sign up on the main site first.

    Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    Yes, but Why doesnt it Show everywhere just the Custom BP slug (As on rootblog)? Why the redirection?

    To make it clear (excuse my english):

    Why: Blog.org/Wp-signup.php

    instead of: Blog.org/register

    ?

    Avatar of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    do you have buddypress enabled as a sitewide plugin? the registration is a function of wpmu and the register slug is a function of buddypress. If you have blogs that don’t have buddypress installed as a plugin, they will not redirect the user to the BP_REGISTER_SLUG

    Avatar of Michael Berra
    Michael Berra
    Participant

    @miguael

    Yes it is sitewide and I think it is good that they finally go to the register-slug. But maybe the sitewide/ Not-sitewide Option is an answer… I guess after all, it is not too important. Thx for your efforts!

    Avatar of Ted Mann
    Ted Mann
    Participant

    @tedmann

    I’m having this same problem, I think. Since upgrading to 1.2, my custom BP_REGISTER_SLUG doesn’t work anywhere other than the root blog buddybar. Other blogs and login widget all direct to blank wp-signup.php page. http://injersey.com

    Any ideas?

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    This problem comes from the bp_has_custom_signup_page function.

    It checks to see if your theme can locate_template( array( 'register.php' ), false ) or locate_template( array( '/registration/register.php' ), false ) )

    Since your child theme has neither of those files, naturally it will return false and give you wp-signup.php as the link. To counter this, BuddyPress attempts to be smart and redirect to BP_REGISTER_SLUG.

    If you always want to bypass this check all together, you could try putting this in your bp-custom.php file…

    function bp_custom_get_signup_page( $page ) {
    global $bp;
    return $bp->root_domain . '/' . BP_REGISTER_SLUG;
    }
    add_filter( 'bp_get_signup_page', 'bp_custom_get_signup_page' );

    Note that bp_get_activation_page and bp_has_custom_activation_page work the same way, and the same rules apply if for some reason you want to bounce people from a different activation page.

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Hey JJJ,

    Tried this out on an install where BP is setup in a sub blog on WPMU 2.9.2.

    Didn’t work on the root blog. The root blog had its own wp-signup.php page.

    For now, I’m using a rewriterule in .htaccess and redirecting to the BP subblog’s register page.

    Avatar of Ted Mann
    Ted Mann
    Participant

    @tedmann

    I’ve been getting pummeled with spam signups ever since the BP_REGISTER_SLUG stopped working throughout the site. I used R-A-Y’s idea of just having an .htaccess redirect. Just curious: If others have taken that approach, does it indeed cut down on spam signups?

    Avatar of valuser
    valuser
    Participant

    @valuser

    Didn’t work on the root blog. The root blog had its own wp-signup.php page.
    For now, I’m using a rewriterule in .htaccess and redirecting to the BP subblog’s register page.

    Any more detail on this please. What to put in .htaccess in this situation

Viewing 14 replies - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.