Re: fullname vs username vs first + last name…
This is my pet peeve with Buddypress! Wasted at least two weeks on this issue last Summer.
I use the same Beau Lebens email as login plugin that David Lewis found. So I wanted to get rid of username entirely and have basically only real name and email address on my registration form.
To integrate a mailinglist script I needed separate firstname + lastname. Buddypress doesn’t store them out-of-the-box. This is NOT a WPMU issue; WP/WPMU has firstname + lastname in wp_usermeta, but Buddypress simply refuses to synchronize those fields, so you can’t count on the data being there for other scripts (mailinglist, events, etc.).
Here’s my solution:
var tmp = document.getElementById('field_1').value;
tmp = tmp.toLowerCase().replace(/^s+|s+$/g, "").replace(/[_|s]+/g, "");
tmp = tmp.replace(/[^a-z0-9-]+/g, "").replace(/[-]+/g, "").replace(/^-+|-+$/g, "");
document.getElementById('signup_username').value = tmp;
Unfortunately a lot of people sign up with only one name in the Fullname (field_1) field. Question:
Would anyone know how to validate/check the input for a two-part (minimum) name? You’d probably have to check for a space, make a space required. How would that script look?
No firstname/lastname because this does not work for a lot of international users.
Which countries are you talking about?! Name them.
With all due respect, this is such a bizarre argument. Not only the western world, but India, China, etc. all have no problem whatsoever using two or more names. Countries that use only one name or more than four can write their own plugins, along with the language pack etc.
More than two names is no problem; separating first and last name is primarily about having a first name available. Users can put their other two, three, four names in the second field.
If Facebook, LinkedIn, etc. have no problem requiring separate firstname and lastname, why is this such a controversial issue for Buddypress? Why make life difficult for 80-90 percent of Buddypress users just to prevent offense to 10 percent with different customs?