I've chosen Drupal to help me create a blog specifically for Second Life users. Now for anyone who wishes to register, we require them to create a user name that matches their SL user name exactly. For instance, if someone's SL user name is Holly McQuire, then that's the username she needs to register with on my website.

As you see, there's a first and last name, and I basically want to force people to choose a first and last name in the username form when registering. So instead of:

Username

I require:

Username(firstname)Username(lastname)

Hope that makes sense, and hope someone can tell me how to manage this.

Comments

jayakrishnan-1’s picture

Create profile fields First Name and Last Name and set it to appear in the registration page, set it as required field

Regards

Kazona’s picture

That's not exactly what I was looking for. What I mean is, I want people to use the same username on my website that they use on Second Life. For instance, my name on Second Life is Algenight Cline, and as such that's the name I'll register at my website--as my username.

Same goes if someone has a character in Second Life with the name Ted Picker. Then that would be the username I want them to register at my website as well. So basically in the desired username box, I need them to fill in their complete Second Life name (first and last).

So I want that field to work in such a way that if Ted Picker tries to register with "Ted," "Picker," or "TedPicker" it would return an error, and request said person to fill in their complete name, as it is registered at Second Life, being Ted Picker.

Of course in that case everyone could still register with any name they make up, but I can easily verify that newly registered people do, indeed, have an active Second Life account. If, however, I allow people to register a username that consists of only one name, then it'd be impossible for me to verify their SL account, so the acount they just created at my website will be deleted.

So in short: If someone with the name Ted Picker in Second Life registers at my website, they need to create the username, Ted Picker.

P.S. Second Life always requires everyone to choose a first and last name for their character, so at no time would there be anyone from that game who would have a character with just one name.

Edit: Here's the code I need changed accordingly,

  if (user_access('change own username') || $admin || $register) {
    $form['account']['name'] = array('#type' => 'textfield',
      '#title' => t('Username'),
      '#default_value' => $edit['name'],
      '#maxlength' => USERNAME_MAX_LENGTH,
      '#description' => t('Your username. This <b>must match</b> your Second Life username; punctuation is not allowed except for periods, hyphens, and underscores.'),
      '#required' => TRUE,
    );

I need that changed in such a way that in the textfield they'll enter a first and last name as their username. (Note, I do not want two separate fields for this. Just the one field where people must enter a first and last name.)

Anonymous’s picture

I need (read: would like to have) a signup system where people use their real name as their username.

I guess I could do that by adding text to the registration form that says 'Please use ral name as username' or something similar - but it's not easy to check.

Ideally a form with: First name (required), Middle name or initial (optional) Last name (required), which then combines to be the username.

I would also like to set login as: 'email' + 'password'.

I'm guess alt login, which I already have, could be used for this - but again, it may need some changes to work as I need it to, and so people using the site undersand what's going on. :D

kwgossett’s picture

I too would like to require First name and Last name upon registration (although not a complex solution like the original poster).

I've included these fields in my Content_Profile page (D6). How do I expose them to the Registration form?

Thanks,
Kelly