Skip to:
Content
Pages
Categories
Search
Top
Bottom

Modify Invitation URL to Have More Parameters

  • Avatar of techguy
    techguy
    Participant

    @crashutah

    One other idea. In the link to sign up, why not include the group number (or list of numbers) so that the registration theme page could be customized with a special welcome based on the group that invited them without having to do an extra query to the database to see which group they’ve been invited to join.

    Something like: http://domain.com/register/accept-invitation/test2%40test.com/groupid=12

    Maybe you could just include a hook where we can modify it as we wish.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    I will definitely make the URL filterable.

    IMO it only makes sense to have the accept invite page customized per group if the user will then be added to the group automatically, as you suggest in another thread. (why warn someone if they’re just receiving an invite?) so if I implement the auto join suggestion, I will definitely add some info to the register page about group invites.

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    @techguy In version 0.6.2 there’s a new filter on $accept_link:
    $accept_link = apply_filters( 'invite_anyone_accept_url', site_url( BP_REGISTER_SLUG ) . '/accept-invitation/' . urlencode($email) );
    I also added

    just above the accept invitation screen, so that you can hook an action in there, grab $_GET, and do whatever you’d like to it. It’s a start!

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    oops, the php got stripped. I added
    php do_action( 'accept_email_invite_before' )
    inside of PHP delimiters

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

You must be logged in to reply to this topic.