sonicdriven
08-12-2007, 07:12 PM
Hopefully someone can help me figure this out..
basically just want to set a minimum password length on the register form.
i added the following to register.php above the check for matching passwords (figured I'd move it to a plugin once I got it working in register.php)
above this
// check for matching passwords
i added:
if (strlen($vbulletin->GPC['password']) < 8)
{
$userdata->error('passwordtooshort');
}
but both $vbulletin->GPC['password'] and $_POST['password'] seems to always = 0 when I use strlen()
another example I tried with no success:
$pwlength = strlen($_POST['password']);
if ($pwlength < 8){
//$userdata->error('passwordtooshort');
echo $pwlength; // always 0
}
I'm sure its something simple I'm overlooking, any ideas are appreciated.
PS for version 3.6.8
basically just want to set a minimum password length on the register form.
i added the following to register.php above the check for matching passwords (figured I'd move it to a plugin once I got it working in register.php)
above this
// check for matching passwords
i added:
if (strlen($vbulletin->GPC['password']) < 8)
{
$userdata->error('passwordtooshort');
}
but both $vbulletin->GPC['password'] and $_POST['password'] seems to always = 0 when I use strlen()
another example I tried with no success:
$pwlength = strlen($_POST['password']);
if ($pwlength < 8){
//$userdata->error('passwordtooshort');
echo $pwlength; // always 0
}
I'm sure its something simple I'm overlooking, any ideas are appreciated.
PS for version 3.6.8