MarkPW
07-11-2006, 12:41 AM
I'm attempting to add a small plug-in to the register_addmember_process hook so that I can check for invalid characters in usernames.
I've put together the following code, however when testing on the registration page the phrase (which I have added as a custom phrase) is not retrieved and is returned as... "Could not find phrase 'm24_invalidusername'". I've also tested using default phrases so I know there isn't a problem with my custom phrase, and I receive the same error.
if(!ereg("^[a-zA-Z0-9_-]+$",$vbulletin->GPC['username']))
{
$userdata->error('m24_invalidusername');
}
Would anyone know why this isn't working?
I've put together the following code, however when testing on the registration page the phrase (which I have added as a custom phrase) is not retrieved and is returned as... "Could not find phrase 'm24_invalidusername'". I've also tested using default phrases so I know there isn't a problem with my custom phrase, and I receive the same error.
if(!ereg("^[a-zA-Z0-9_-]+$",$vbulletin->GPC['username']))
{
$userdata->error('m24_invalidusername');
}
Would anyone know why this isn't working?