[TYPO3-dev] Install tool removes dots from admin usernames

Martin Kutschker masi-no at spam-typo3.org
Sat Jan 10 19:58:35 CET 2009


Marcus Krause schrieb:
> Steffen Kamper schrieb am 10.01.2009 16:16 Uhr:
> 
>> the syntax is bit different, also the - in characterclass has to be
>> escaped
>>
>>  preg_replace('/[^A-Za-z0-9_\-.]/','',$username)
> 
> I guess, the same with the dot. ;-)
> 
> preg_replace('/[^A-Za-z0-9_\-\.]/','',$username);

Neither is correct. You don't have to escape the dot, and if use place
the dash as the last character you may use it without escaping.

/[^A-Za-z0-9_.-]/

Masi




More information about the TYPO3-dev mailing list