Welcome to Geeklog, Anonymous Friday, January 03 2025 @ 08:30 am EST

Geeklog Forums

username length


Status: offline

arthur

Forum User
Junior
Registered: 10/10/03
Posts: 34
Is it possible to change the default length of a username? If so, how would I do it?

Thanks.
Arthur (http://www.shrednow.com)
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The limit is 16 characters, defined by the database (field 'username' in table 'gl_users'), so you would need to change that and all the forms where you can enter a username ...

bye, Dirk
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
In layout/your_theme/admin/user/edituser.thtml, layout/your_theme/users/registrationform.thtml, layout/your_theme/preferences/username.thtml, and layout/your_theme/users/getpasswordform.thtml: you should see a line like the following:

Text Formatted Code
<input type="text" size="16" name="username" value="{username}"> {do_not_use_spaces}<br>

 


The size="16" tells the box to only accept the first 16 characters of the username. You can make this bigger in all of these places, but you first have to make sure that the appropriate column in the database can accept strings that are that long. Depending on how long you want usernames to be, you may have to edit the attributes of the appropriate GeekLog database table.

[EDIT: Dirk beat me to the punch!]
 Quote

Status: offline

arthur

Forum User
Junior
Registered: 10/10/03
Posts: 34
Thanks for your quick advice. Your suggestions allowed me to expand the maximum length.
Arthur (http://www.shrednow.com)
 Quote

All times are EST. The time is now 08:30 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content