Skip to:
Content
Pages
Categories
Search
Top
Bottom

A small hack in register.php to avoid frustration


  • Gene53
    Participant

    @gene53

    Hi,

    I’ve had a few complaints from new members that upon registration, they would input Caps, hyphens and underscores in their username (Rob_1976) only to get “Only lowercase letters and numbers allowed” upon submitting the form.

    In order to circumvent this, I inserted the following in register.php:

    <p><b>* Only lowercase letters and numbers allowed</b></p>

    Below::

    <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" />

    I hope that’ll take care of the problem and if someone knows of a better way to accomplish this, please do not hesitate to chip in.

    Cheers,

    Gene

Viewing 1 replies (of 1 total)

  • jivany
    Participant

    @jivany

    Creating your own copy of the register.php file in your child theme is fine.

    If you don’t want to touch the file, you could hook into either bp_before_account_details_field or bp_signup_username_errors to display a similar notice. Just create a new function in your theme’s functions.php that spits out your message and use the add_action function to hook into your chosen location.

Viewing 1 replies (of 1 total)
  • The topic ‘A small hack in register.php to avoid frustration’ is closed to new replies.
Skip to toolbar