Skip to:
Content
Pages
Categories
Search
Top
Bottom

Modifying / Customising the registration process


  • Iain Manley
    Participant

    @iainmanley

    I’d like to change how users sign up to my site, languagecollective.org. I want to place the Account Details form on my home page. Once users enter these details and click on submit, I want to take them through to a second page where they enter their profile details. I’ve Googled my fingertips raw trying to find a hack for this, but, although I thought it would be a fairly standard request, I’ve not come across anything very useful. Surely somebody has this is action?

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

  • pcwriter
    Participant

    @pcwriter

    @Iain Manley

    How about this workaround:

    1 – Create a page template and copy the content of your register.php file to it.
    2 – Create a blank page in WP using that template. Eg: my-custom-home-page
    3 – Under “Settings” > “Reading”, select that WP page as a static page at “Front page displays”…

    Now your front page IS your register page. Next… @Brajesh at Buddydev has coded a cool activate/login/redirect plugin that can do the rest:

    http://buddydev.com/plugins/buddypress-premium-plugins/plugin-bp-auto-activate-auto-login-redirect-to-profile-automatically-activate-your-new-user-signuplog-them-in-and-redirect-to-their-buddypress-profile-on-signup/

    I’m sure you could tweak the code of that plugin to redirect to the “edit profile” template rather than the “Public” view.

    Hope it works! :-)


    Iain Manley
    Participant

    @iainmanley

    Thanks @pcwriter. I’ll give it a try and let you know if it works.


    Iain Manley
    Participant

    @iainmanley

    I’m having trouble. The form is empty, because bp_get_current_signup_step() is not being returned as equal to ‘request details’ on line 12. I don’t think anything is being returned for bp_get_current_signup_step(), because I’m not on register.php. Any idea how to fix / work around this? You can see what I mean at languagecollective.org. ( @pcwriter)


    Iain Manley
    Participant

    @iainmanley

    Does anybody know how to get bp_get_current_signup_step to work on a page other than register.php?


    Iain Manley
    Participant

    @iainmanley

    Can somebody at least tell me whether this is possible? Or am I wasting my my time?


    Boone Gorges
    Keymaster

    @boonebgorges

    It’s not straightforward, but it is possible. You’ll have to replace bp_core_screen_signup() (where the value of $bp->signup->step is set) with your own custom function. You’ll need to do the following:
    `remove_action( ‘wp’, ‘bp_core_screen_signup’, 3 );`
    to remove BP’s registration function, followed by
    `remove_action( ‘wp’, ‘my_bp_core_screen_signup’, 3 );
    function my_bp_core_screen_signup() { // etc`

    Copy the contents of bp_core_screen_signup() into your custom function. Then start looking for the places where $bp->signup->step is set – that’s what you’ll need to mess with to modify the way that registration steps work.


    pcwriter
    Participant

    @pcwriter

    @Iain Manley

    Sorry my workaround isn’t working as hoped… the easy solutions aren’t always the best ;-)


    pcwriter
    Participant

    @pcwriter


    garrethmcdaid
    Member

    @garrethmcdaid

    require( ‘./wp-load.php’ );
    require( ‘./wp-blog-header.php’ );
    require($_SERVER . “/wp-content/plugins/buddypress/bp-themes/bp-default/registration/register.php”);

    These are the dependencies for the BP registration process. Once all 3 are loaded, the form will work.

    I have a custom BP installation in which I bypass the main BP index.php file and use WPMU and BP functions as I need them.

    To get the slugs to work, I change my .htaccess file as such:

    RewriteRule . index.php?slug=1 [L,NC,QSA]

    and then my index.php as such:

    if (isset($_GET)) require( ‘./wp-blog-header.php’ );

    In that way, the BP header is only loaded when a slug is used, and I can bypass it otherwise.

    I would like to know if there is ANY way to add code to the registration page ( /register )

    I want to include code that will automatically take information from the /register page and have it not only register the person on my buddypress site, but also to another site located on another domain.

    I have the code that will do what I want, but I can not figure out how to insert it into the “FORM” of the /register page. BuddyPress does not give you a way to add a profile “field” to the registration page that is “hidden” and I need to include a hidden tag into the registration form.

    ANY Suggestions???

    Gator


    Boone Gorges
    Keymaster

    @boonebgorges

    Check out the template file `register.php`, located in `buddypress/bp-themes/bp-default/registration/register.php`. You have a couple possible strategies:

    1) Copy register.php to your child theme and add hidden inputs directly in the markup
    2) Hook to one of the many do_actions littered through the code to add your fields. Eg
    `function bbg_add_reg_field() {
    echo ”;
    }
    add_action( ‘bp_before_registration_submit_buttons’, ‘bbg_add_reg_field’ );`

    Then you’ll have to catch the data being sent. I recommend doing something like this
    `function bbg_grab_reg_data() {
    if ( isset( $_POST ) ) {
    // do something with the custom data
    }
    }
    add_action( ‘bp_complete_signup’, ‘bbg_grab_reg_data’ );`

    @boonebgorges
    Hi Boone,
    I am trying to create a multi step sign-up registration page. Preferably also include some new profile field such as multi category drop down list and country with flags. Should i create new rows in wp_bp_xprofile_fields?
    or just follow the example above and it will create it for me?
    I was also wondering if I can have have something like step1, step2 etc like godaddy.com?


    ayushpratap
    Participant

    @ayushpratap

    Is there a way I can show “username already exists” (if username already exists of course) on mouse out in bb registration form, without clicking submit button and wait ? I have tried one and only plugin of Brajesh with no luck, it doesnt affect my registration page at all as if nothing has happened, I also hard coded jcript and required php, didnt work.

    Now I am thinking to automate the facility provided by BB itself.
    Any ideas people..???


    ayushpratap
    Participant

    @ayushpratap

    @boonebgorges How can I show “username not available” message on mouse out from the field instead of clicking submit button and then check.
    – Registration page(website.com/register.php), BP-Default child theme, Buddypress 1.8, wordpress 3.6.1


    ciromanigrasso
    Participant

    @ciromanigrasso

    Hi all, I have the same issue: a multi step registration. How did you solve the problem?


    danbp
    Moderator

    @danbp

    @ciromanigrasso
    open a new tread please – this one is 3 1/2 years old…. 👿 – read here before and explain YOUR issue!

    Thx

Viewing 16 replies - 1 through 16 (of 16 total)
  • The topic ‘Modifying / Customising the registration process’ is closed to new replies.
Skip to toolbar