registration form redirecting to Register page.

Hey, I am using the code below in my modified admin bar:

<form name="registerform" id="registerform" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post">

<h2><?php _e('Join Us!'); ?></h2>

<fieldset><label class="login_label" for="user_login"><?php _e('Username') ?></label>

<input class="textfield" type="text" name="user_login" id="user_login" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="20" tabindex="10" />

<label class="login_label" for="user_email"><?php _e('E-mail') ?></label>

<input class="textfield" type="text" name="user_email" id="user_email" value="<?php echo attribute_escape(stripslashes($user_email)); ?>" size="25" tabindex="20" />

<?php do_action('register_form'); ?>

<div class="clear"></div>

<?php _e('An email will be sent!') ?>

<input type="image" name="wp-submit" id="wp-submit" value="<?php _e('Register'); ?>" src="/wp-content/plugins/wickedbar/skins/default/images/wickedbar-register.png" />

</fieldset>

</form>

but somehow this is redirecting me to “/register” page.

Any clues to make the above code BP compatible?

(I guess, its because buddypress requires Name field while registration)

  • drmike
    • DEV MAN’s Mascot

    Can’t help with the redirection but….

    Considering how much subdomains and the like are thrown around on one of these sites, I’d be hardcoding in any image url that I could, just to be on the safe side.

    I know some sites who shall remain nameless throw all of those icons and images onto their s.wpmuinstall.tld subdomain and serve them from there.

  • wickedsoul
    • WPMU DEV Initiate

    What all I am trying to do is to enable a site visitor to register from a form in my modified admin bar directly, without going through register page, if possible. I can include more fields like ‘blogname’, ‘name’, ‘password’ if need be. Good for getting more members, as registration is within a hands reach :slight_smile: (that’s psychological :p )

    Oh, I am using a slider to give me the required space for the form.

    I have another solution for this, by using an iframed “register” page into the homepage, but if possible I will love to see the user being able to register through the top-admin-bar directly.

  • wickedsoul
    • WPMU DEV Initiate

    hmm.. basically like i get the username and email from user in the form inside slider and then post those inputs to /register. Yes, that should do the trick as well. And, you are right BP isn’t WPMU :stuck_out_tongue:

    Thanks for this.

    (Oh, on a side note, do you have any idea about the base theme for h-mag.com? I do have a feeling that it is using some child theme. I like the layout and would love to use the parent theme for myself. :slight_smile: )

  • wickedsoul
    • WPMU DEV Initiate

    @Richie:

    My code contains this:

    <form name="registerform" id="registerform" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post">

    which means my form variables were getting posted to wp-login.php, but as Aaron said BP “will” funnel everything through /register page. :slight_smile:

    So (I havent tested it though) I guess the code you’ve given above wont work actually, until the variables are passed on to /register page, or am I missing something again? :expressionless:

  • Richie_KS
    • HummingBird

    ahh..i see..you’re not making the edit in registration/register.php

    i don’t think it possible seen bp register a xprofile when a new user…bringing the

    register component out side may not work.

    maybe something like adding a <?php include(TEMPLATEPATH . ‘/registration/register.php’:wink:; ?> to your adminbar.

    of coz you may want to edit or remove some element from register.php so it fit in your

    custom admin bar…basically a minilism version of register page…that way all the bp step component when register will stay intact.

    cheers