Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to use full name, first name + last name


peterverkooijen
Participant

@peterverkooijen

If during registration the user actually enters their fullname–which means that there is at least a single space between their first name and whatever comes after that–then this function will parse the datum and create first_name and last_name meta pair entries in wp_usermeta.

Making that required would solve a lot of problems and make the system a lot more consistent imho. As it is you can’t rely on wp_usermeta (or fullname…), so if you want real names you have to come up with complicated work-arounds.

The full name registration field is already required. Why not put some standards on it? At the moment it is unclear, to users as well, what this field is for exactly. Display name? Another username? A blog name? A blog URL name?

The function will parse it as follows, placing these entries in wp_usermeta:

first_name: John

last_name: James Jacoby

Nothing wrong with that. It’s handy to be able to use the first_name separately, but I can’t think of scenarios where I would only use the last_name.

Even if you wanted to use last_name by itself, you have to work with the information the user gives you. If the user wants to be a pompous ass and include his middle name, that’s his problem. ;-)

First name + last name is an issue for me because I have to import a members list where this data is separate. So I need to make a decision what to do with that.

You could do a check to make sure that there is at least one single space in the “Full Name” field before allowing the registration to be processed, but you will have no guarantees that they have used their real full name or that they have used just their first and last names.

Facebook and LinkedIn don’t have those guarantees either. From my existing 600+ members list, built with a PunBB-based registration form, I know that most people will give their full, real names if asked nicely – I did need to add some code to capitalize the first letters.

It depends on the etiquette of the site. If everybody is identified with their full names, new members will give their full names to be part of the club. That’s one reason why I dislike usernames. Emphasizing usernames teaches users wrong behavior, says it’s OK to identify yourself by BS pseudonyms.

Skip to toolbar