Skip to:
Content
Pages
Categories
Search
Top
Bottom

Username (in)valid characters

  • Avatar of jeremiah82
    Jeremiah82
    Member

    @jeremiah82

    Hi everybody.

    I already posted at the wordpress forums but i found out that my problem is based on the install of buddypress, so i’m asking here.

    I want to convert a complete community to wordpress+bbpress and possibly +buddypress.

    We have about 40k users.

    I noticed that it is not possible to enter usernames with “-”, “_”, ” ” and stuff like that.

    But a lot of our users have such usernames.

    The problem is in the function validate_user together with sanitize_user.

    Now, maybe because i’m a WP novice, i’m asking myself why this is, like it is.

    Why aren’t spaces and co not allowed in usernames?

    What would happen if i change the functions?

    What does depend on such usernames?

    Second:

    The Name field.

    I know that people doing social networking etc love to be as public as possible.

    But our community depends on privacy and second on control.

    It may be possible to tell my users: You can use another login name than the one which is displayed (pro, more secure)

    Problem 1: Too many old users.

    Problem 2: I don’t want users to be able to switch there display name. Everyone should be able to identify who he is talking to.

    Problem 3: I don’t want urls with username or fullname or whatever in it.

    I’m sorry, but i’m stuck with the problem that this community should be ported to wordpress. And now i have to find a solution. I hope someone can help even if it breaks the idea of social networking stuff.

    TIA

Viewing 1 replies (of 1 total)
  • Avatar of jeremiah82
    Jeremiah82
    Member

    @jeremiah82

    Ok, for now i have this solution:

    bp-core-wpabstraction.php

    $maybe = array();
    preg_match( "/^[A-Za-z0-9_-]*[A-Za-z0-9_.s-]+/", $user_name, $maybe);
    // preg_match( "/[a-z0-9]+/", $user_name, $maybe );
    $illegal_names = get_site_option( "illegal_names" );

    I changed the preg_match record to another regexpr. It works for now. I hope there is someone who can tell why i shouldn’t do that.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.