Where Is The File For The Registration Page?

I'm already getting questions about why usernames aren't being allowed. I want to add a better message there so that people understand what is going on - but I can't figure out where to edit that text.

What file is the text below located in?

(Must be at least 4 characters, letters and numbers only.)

Thank you so much for any help.

~ Corey

  • Timothy
    • Chief Pigeon

    /wp-signup.php

    Line 87:

    echo '<p>(<strong>' . sprintf( __('Your address will be %s.'), $site ) . '</strong>) ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) . '</p>';

    And Line 133:

    echo '<input name="user_name" type="text" id="user_name" value="'. esc_attr($user_name) .'" maxlength="60" /><br />';
    	_e( '(Must be at least 4 characters, letters and numbers only.)' );

    These are core edits that would need changing everytime you upgrade your WordPress install.

  • DavidM
    • DEV MAN’s Mascot

    Hi Corey,

    That would be in the WordPress core, in wp-signup.php. I imagine you could create a language file to change it, it'd just take a bit of work to achieve that.

    I think you might actually be able to change that front-end text using the following plugin too, which would be much easier, though possibly require a bit more resources when serving the page:
    http://wordpress.org/extend/plugins/real-time-find-and-replace/

    And ultimately, there's some discussion on customizing wp-signup in the following thread that may be helpful if you'd like to go to theme or core editing:
    https://premium.wpmudev.org/forums/topic/wp-signupphp

    -Dvaid

  • Timothy
    • Chief Pigeon

    Thanks David! :slight_smile:

    I think thats the first response I got in before you this evening, seems every post I was making was just behind yours ha, ha.

    I started playing with all the updates the other day if you hadn't noticed me on a few times. :slight_smile:

    You have mail by the way :wink:

  • NetPotion
    • The Incredible Code Injector

    Thanks David and Tim!

    Weird, my text editor must be going wonky. I could swear I checked that file. I mean - it *is* the most obvious one. Oh well - I'll give it a go now.

    I really appreciate the quick responses. This is going to help me a lot. =)

    ~ Corey

  • NetPotion
    • The Incredible Code Injector

    Hmmm.....

    Well, I tried the plugin - didn't work. I also edited the wp-signup.php file and nothing changed, it's not being cached either. Now I'm at a complete loss.

    Any other ideas? I wonder if this is coded into the theme somewhere?

    Thanks,

    ~ Corey

  • Timothy
    • Chief Pigeon

    I just took a look through the theme and can't see anything in there.

    I suspect though that you have BuddyPress installed?

    If so then crack open these files:

    /buddypress/bp-blogs/bp-blogs-template.php - Line 473:

    echo '.</strong> ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed so choose carefully!)' , 'buddypress') . '</p>';

    /buddypress/bp-members/bp-members-signup.php - Line 322

    $errors->add( 'user_name',  __( 'Username must be at least 4 characters', 'buddypress' ) );

    Changing it here will of course mean you still need to make those changes every-time you update. So if it is definitely BuddyPress then you might want to take a peak at their codex:

    http://codex.buddypress.org/extending-buddypress/customizing-labels-messages-and-urls/

    Let me know how you get on. :slight_smile:

  • Timothy
    • Chief Pigeon

    Odd, I looked through the themes files so unless I'm missing something then all that is left was the wp-signup.php and the buddypress plugin... Unless I missed it....

    What other plugins you use which affects the signup? Any registration plugins?

    I know you said it was not a cache issue and I don't mean to question you, but I've had instances before were I could swear blind it was not a cache issue and ultimately it turned out to be. I only realised when using a proxy to test or turning off the cache plugin I use (clear cache didn't seem to work on that plugin at the time).

  • NetPotion
    • The Incredible Code Injector

    Hi Timothy,

    Thanks for the tips. After reading your post I got to thinking about the plugins again and remembered a setting that changes the login URL that is in Anti-Splog. It also re-writes the page using its own language file and that was the problem.

    The signup text is located in "wp-content/plugins/anti-splog/languages". When that plugin is installed and the URL change is activated it changes the default text in wp-signup.php.

    I would have never found this if you hadn't have kept me thinking about the plugins. I really didn't expect it to be there. :stuck_out_tongue:

    Thanks again. Sending some points your way for being so helpful. =)

    ~ Corey

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.