Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: dilaca on April 28, 2004, 11:03:01 PM

Title: How do you limit username length
Post by: dilaca on April 28, 2004, 11:03:01 PM
Can someone please tell me how to restrict the length of usernames? 

I can only find the option to limit characters in signatures.

Thanks. :)
Title: Re: How do you limit username length
Post by: [Unknown] on April 29, 2004, 12:55:09 AM
Currently, there's no setting to limit their length.  However, you can go to:

Themes/yourtheme/Profile.template.php (if it doesn't exist, copy it from default...)

And find the following:
Quote<td><input type="text" name="realName" size="30" value="', $context['member']['name'], '" /></td>

Replace that with:
Quote<td><input type="text" name="realName" size="30" maxlength="LENGTH HERE" value="', $context['member']['name'], '" /></td>

-[Unknown]