News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Limiting username characters

Started by Anoni1337, October 19, 2017, 01:57:56 PM

Previous topic - Next topic

Anoni1337

Well I wanna limit username number of characters,sorry if I explained  that wrong way,but I don't want users to abuse long usernames to bug forum so yea.

Anoni1337

@Solved this helped me out

Quote from: Joey Smith™ on August 21, 2009, 08:27:24 AM
OK heres you an easy way of doing this ;)

Look in Themes/default/Register.template.php

Find around line #89
<input type="text" name="user" size="20" tabindex="', $context['tabindex']++, '" maxlength="25" />

Replace with:
<input type="text" name="user" size="15" tabindex="', $context['tabindex']++, '" maxlength="15" />

This will prevent them from entering more than 15 characters ;)

Arantor

Do you let people change their display name? If so this will have no effect.

Advertisement: