What are the allowable characters in a name?

Brogan

XenForo moderator
Staff member
Whatever you set in Options -> User Registration: User Name Match Regular Expression
 

Jake Bunce

XenForo moderator
Staff member
Commas are not allowed as they are used to delimit lists of usernames. There are no other restricted characters to my knowledge. But of course you can impose your own requirements on usernames by defining a regex as Brogan pointed out.
 

bottiger

Active member
There are other restricted characters.

This regex allowed one of the problem names to work.

[\u0000-\u001f\u0080-\u009f]

I need to know if there are more.
 

Jake Bunce

XenForo moderator
Staff member
This function verifies usernames:

XenForo_DataWriter_User::_verifyUsername

There are several restrictions, many of which are user-defined such as censored words.

What error message are you getting? That will help to know which check is failing.
 

Jake Bunce

XenForo moderator
Staff member
Ok, it is failing this check:

Code:
		// ignore check if unicode properties aren't compiled
		try
		{
			if (@preg_match("/\p{C}/u", $username))
			{
				$this->error(new XenForo_Phrase('please_enter_name_without_using_control_characters'), 'username');
				return false;
			}
		}
		catch (Exception $e) {}
For reference:
http://en.wikipedia.org/wiki/Control_character
 
Top