First name and Last name as user name in Drupal

UPDATED 24/11/2007
I have stumbled upon a request (Custom Registration Form) for creating a module, which will use first name and last name to generate a username.

The request was quite simple. I am thinking now about extending it, and creating something like a module which will use any profile field, and it will let you configure from which profile fields usernames will be generated.

Now it will take only two profile fields (you can select them in the settings of the module under administer>user>name registration settings).

When user registers, it hides username from user_register form and it puts your 2 fields on top of the form.

After hitting submit, user name is generated from fields, replacing spaces with underscores and adding a separator '.' between first and last field.

So for example:
if someone registers with first name: Pamela
and last name: Anderson
the username will be Pamela.Anderson

You can change some error messages as well in settings.

Anyways, I want to improve this module, so it will let you define how to generate the username.

Let me know how you like it, and if you think this should be in Drupal repository as a module.

This module was initialy sponsored by Bob Babcock ;)

Files




Need Drupal Theming? Hire us