• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Requiring "First Last" name for registrations

#1
Our vB forum has a strong "reunion" component so from the beginning we've required people to use real names as their user name. Somewhere along the line I set it up to require two word user names (must have a space): Firstname[space]Lastname. On vB it's called "Username Regular Expression." We also manually approve registrations.

A side benefit that has been very helpful is that requiring a [space] in the username cut down spam registrations by 99%.

So, my question is, does XF support requiring a [space] in the registration process?
 

steven s

Well-known member
#2
Judging by my username, spaces are allowed.
Commas are not allowed which may pose a problem with prefixes.

I misunderstood.
I see an option.

  • User Name Match Regular Expression:

    This requires the user names of new registrations to match the given regular expression.
Added: <sigh> I was looking up the answer and was beaten to it while editing my post.
 

Dean

Well-known member
#3
It supports regex in the same way I believe. Though I've not tried requiring a space.

  • User Name Match Regular Expression:

    This requires the user names of new registrations to match the given regular expression.
 
#4
Thanks for the quick replies. It's a challenge to think about switching software packages for an online community that has been going for 13 or 14 years. We started with a Matt's Scripts forum. Then moved to Ceilidh and ran it for several years before going to vBulletin around 6 years ago. I don't need for XF to mimic vB - if I did, I'd just stay put. At the same time, I'm trying to think of real world vB features I don't think we can be with out.
 

steven s

Well-known member
#5
Thanks for the quick replies. It's a challenge to think about switching software packages for an online community that has been going for 13 or 14 years. We started with a Matt's Scripts forum. Then moved to Ceilidh and ran it for several years before going to vBulletin around 6 years ago. I don't need for XF to mimic vB - if I did, I'd just stay put. At the same time, I'm trying to think of real world vB features I don't think we can be with out.
I forgot about Matt's Scripts. Started with that one too. Then UBB-->phpBB2-->vBulletin3/4.
The reason I will eventually convert my vB forums over is for speed. My vB3 site is running OK but I have never changed the styling.
With XF, it is so easy. My vB4 site is sluggish. Lots of queries in the CMS section. High server loads.

XF is just refreshing. The subculture is so much better than where we are coming from.
 

steven s

Well-known member
#8
I think if it stops 99% of the spam its a must to do.
O/T But if you re getting a lot of spam elsewhere, you do not have enough safeguards in place. I get spam attempts every 5 minutes on my vB3 forum but very few register.
And those that do register go into moderation so my members don't even see the post.
 
#9
It's the combination. Most spam 'bots can't figure out how to register with two names. Then, we do manual registrations, so they are looked by a real person before they're approved.

Also, I have a couple of custom questions that are asked.

I didn't know how much good all that was doing until I had to do a fresh install. Before I could tweak all the settings I had been found by the bots.
 

James

Well-known member
#13
^ = start of regex
[a-zA-Z ]+ = allow uppercase and lowercase letters and a space (allow multiples of each, hence the +)
[\s]+ = whitespace (space/tab/etc)
[a-zA-Z]+ = multiple uppercase/lowercase (notice no space)
$ = end regex

Hope that helped.
 

Rigel Kentaurus

Well-known member
#14
You might want to try using instead
^[a-zA-Z ]+[\s][a-zA-Z]+$
Because the [\s]+ would match several spaces, this means that it will accept
John[space]Doe
and
John[space][space]Doe

If you only require one space between words the + sign after the space is not needed
XenForo may prevent that anyway, but I am not sure.
 

James

Well-known member
#15
You might want to try using instead


Because the [\s]+ would match several spaces, this means that it will accept
John[space]Doe
and
John[space][space]Doe

If you only require one space between words the + sign after the space is not needed
XenForo may prevent that anyway, but I am not sure.
True, but in the start of his regex: "[a-zA-Z ]+", spacing is allowed multiple times so it's screwed there anyway unless spacing is removed from the first part of the regex.
 

Rigel Kentaurus

Well-known member
#16
True, but in the start of his regex: "[a-zA-Z ]+", spacing is allowed multiple times so it's screwed there anyway unless spacing is removed from the first part of the regex.
Oh .... that I didn't see. Yes, the expression should only be [a-zA-Z]+ without the space then. Actually, I think that regex would match not only FIRST LAST but also FIRST MIDDLE LAST and any number of words actually