11-22-2005, 03:37 AM
|
|
|
|
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by Jenta
PHP Code:
// bad characters
$cleanchr = preg_replace("/[^ \\\\{}\^`\[\]\|\-\w]/", "", $vbulletin->userinfo['username']);
// leading numbers and dashes
$cleannum = ereg_replace("^[0-9\-]*[0-9\-]", "", $cleanchr);
// convert spaces to underscores
$nick = ereg_replace(" ", "_", $cleannum);
|
I'm sure you meant $bbuserinfo[username]
We aren't on 3.5 yet
Chris
|