Skip to:
Content
Pages
Categories
Search
Top
Bottom

Registration Mystery – how to use username instead of First/Last?


  • CriticalNed
    Participant

    @criticaltodd

    I test-registered 10 fake users. Somehow I managed to create one user with no First and Last name. All I see is the username.

    My question is, how do I duplicate this?? This is actually good, since I’m migrating over a message board community that is more comfortable with using their username “handles” rather than real-life identities.

    Second question: is it possible for users to specify whether they want to use their username or First/Last?

Viewing 10 replies - 1 through 10 (of 10 total)

  • gogoplata
    Participant

    @gogoplata

    The mod is pretty simple, but I need to look up what files I modified. I’ll post how I did it tomorrow, but it’s really easy and should take less than five minutes to do.


    CriticalNed
    Participant

    @criticaltodd

    thanks! let me know.


    gogoplata
    Participant

    @gogoplata

    The basics of what I did was edit bp-xprofile.php and removed these lines:

    $sql[] = “INSERT INTO “. $bp . ” (

    id, group_id, parent_id, type, name, description, is_required, field_order, option_order, order_by, is_public, can_delete

    ) VALUES (

    1, 1, 0, ‘textbox’, ‘” . __( ‘Public Display Name’, ‘buddypress’) . “‘, ”, 1, 1, 0, ”, 1, 0

    );”;

    $sql[] = “INSERT INTO “. $bp . ” (

    id, group_id, parent_id, type, name, description, is_required, field_order, option_order, order_by, is_public, can_delete

    ) VALUES (

    2, 1, 0, ‘textbox’, ‘” . __( ‘Last Name’, ‘buddypress’) . “‘, ”, 1, 2, 0, ”, 1, 0

    );”;

    Then I went into my database and deleted those fields. Once those are gone BP defaults to using the username.


    CriticalNed
    Participant

    @criticaltodd

    Well, that’s pretty severe, but that’ll work, I gotta admit!

    Thanks for the tip, but I do think some users want the *option* to use First/Last… I’ll keep poking around the code and see if I can figure that out.


    gogoplata
    Participant

    @gogoplata

    If you just want it to be optional you can simply modify the code detailed above to make First and Last name optional instead of required or just delete that code as I said then add new fields from the admin for first name and last name.

    For my site, I removed the code above then made a new field simply called “Name” that was option so users could share their name if they wanted to, but their username is still used around the site.


    advinci
    Participant

    @advinci

    I want them to be optional too. But into what do I change “is_required”? “is_optional”? “not_required”?

    Thanks in advance.


    advinci
    Participant

    @advinci

    The last thing I asked was pretty simple to answer if you know it. So could someone help please?

    By default the fields are no longer “First Name” and “Last Name”, instead it is just “Full Name”. Users can enter a handle in there if they like.


    gogoplata
    Participant

    @gogoplata

    Yeah, with the latest revision I just changed the title from “Full Name” to “Display Name” and this hack isn’t needed any longer.


    peterverkooijen
    Participant

    @peterverkooijen

    I guess I need the exact opposite. I only want full real names in the site, if possible entered as seperate first name + last name at sign-up.

    I just reinstallend WordPress MU+Buddypress and now when I sign up test users, only the user_login gets copied to the display_name field in wp_users.

    How can I force it to put the real full name in display_name?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Registration Mystery – how to use username instead of First/Last?’ is closed to new replies.
Skip to toolbar