The MU forums have moved to WordPress.org

login with 3 characters? (12 posts)

  1. j0han
    Member
    Posted 17 years ago #

    Hi there!

    Are there any "real reason" why I should not allow users to register with only 3letters?

    Tryed to change the code, like 3 places. And it all works to register with 3 letters after that. but are there any other stuff I should look into? Why is't set at 4? Any special reason?

    Have searched but not found any reason?

    Regards,
    Johan
    Sweden

  2. drmike
    Member
    Posted 17 years ago #

    None that I'm aware of. I know some *.tlds have a min legenth requirement but I don't think that would affect subdomains.

  3. j0han
    Member
    Posted 17 years ago #

    Aight, then I'll go for 3 characters instead.

    Someone else that know of some problems?

    Guess nothing is unfixible.

  4. lunabyte
    Member
    Posted 17 years ago #

    None that I'm aware, but I'm sure there's some sort of logic behind it.

  5. drmike
    Member
    Posted 17 years ago #

    I dropped Donncha an email.

  6. donncha
    Key Master
    Posted 17 years ago #

    It's a legacy thing - on WordPress.com we use languagecode.wordpress.com for different languages. Try es.wordpress.com to get the Spanish one. Since most language codes are 2 or 3 characters we set a minimum length on the username.

    Change the limit on your own install if you like. It shouldn't break anything.

  7. drmike
    Member
    Posted 17 years ago #

    Dang, that was quick. :)

  8. lunabyte
    Member
    Posted 17 years ago #

    Nice to know Donncha. There's always "some" reason to it.

  9. zard
    Member
    Posted 17 years ago #

    ...and could you please give me a hint what files should I edit?

  10. drmike
    Member
    Posted 16 years ago #

    wp-includes/wpmu-functions.php

    The check is in the wpmu_validate_user_signup function.

  11. giovannimcosta
    Member
    Posted 16 years ago #

    I tried but nothing happens...
    I edited the "wpmu_validate_user_signup" function.
    But still don't let the user register a blog with 2 carachters...

    anyone can help ?
    thanks.

  12. giovannimcosta
    Member
    Posted 16 years ago #

    I found the solution and it works in WPMU 1.2.4
    Follow these steps and let wpmu works.

    1) open the "wp-includes/wpmu-functions.php" (like drmike said)

    2) In this function "wpmu_validate_blog_signup"
    change the line number "1023"

    if( strlen( $blog_id ) < 4 ) {
    to
    if( strlen( $blog_id ) < number_you_want ) {

    3) In this function "wpmu_validate_user_signup"
    change the line number "933"

    if( strlen( $user_name ) < 4 ) {
    to
    if( strlen( $user_name ) < number_you_want ) {

    Any trouble reply my comment.
    :)

About this Topic

  • Started 17 years ago by j0han
  • Latest reply from giovannimcosta