Topic: Limit caracter for new registration ???

Hello, 
I want to know if already exist a modification to limit the LOGIN of the members which join has one certain count of letter and number.

Exemple

"Your LOGIN is limited to 12 caracter"

If it exist not how to make it ??? 

Thank you for your answers

N3twork

Re: Limit caracter for new registration ???

up.

Re: Limit caracter for new registration ???

Well there is an easy way to do it.
Open up register.php
find

<label><strong><?php echo $lang_common['Username'] ?></strong><br /><input type="text" name="req_username" size="25" maxlength="25" /><br /></label>

and replace with:

<label><strong><?php echo $lang_common['Username'] ?></strong><br /><input type="text" name="req_username" size="12" maxlength="12" /><br /></label>

That would be enough, but if you want to get a little fancy, you can change some other things, though this should be enough for what you're looking for.

Re: Limit caracter for new registration ???

Well, if he wants anyone with a little knowledge to be able to bypass it... smile

The way to fix it, along with the above change, is this (also in register.php)
FIND

    else if (pun_strlen($username) > 25)    // This usually doesn't happen since the form element only accepts 25 characters
        message($lang_common['Bad request']);

REPLACE WITH

    else if (pun_strlen($username) > 12)    // This usually doesn't happen since the form element only accepts 25 characters
        message($lang_common['Bad request']);

Re: Limit caracter for new registration ???

still, "with knowledge" it's possible to have a name shorter than 12 wink

else if (pun_strlen($username) != 12)    // This usually doesn't happen since the form element only accepts 25 characters
        message($lang_common['Bad request']);

otoh only accepts 12 char long strings smile

Re: Limit caracter for new registration ???

but he wants it to accept less than 12 he said limit to 12 hmm

7 (edited by Frank H 2005-05-17 09:46)

Re: Limit caracter for new registration ???

hmm ... I suppose we're taking "limited" in 2 ways (I take it as only 12 allowed, and you+smartys max 12 smile)

heh ...well we'll see what he is looking for I assume smile