Configure minimum length of a username

You have a suggestion for a future version of phpMyFAQ? Then post it here!

Moderator: Thorsten

Post Reply
bram
Posts: 19
Joined: Mon Aug 16, 2010 12:54 pm

Configure minimum length of a username

Post by bram » Tue Aug 17, 2010 9:43 am

Currently the minimum length of a username is hard coded and is not configurable.

This is set in 3 places:
1. inc/User.php (private $login_minLength = 4;)
2. register.php ($loginMinLength = 4;)
3. admin/User.php ($loginMinLength = 4;)

In addition to that there is a regex in inc/User.php that (inidirectly) sets a minimum length on the username of 2 characters. (private $_validRegExp = '/^[a-z][\w]+/i';)

The propsal is to make the minimum length configurable. (and maybe the regex too)

(In our current setup the phpMyFAQ is linked with an ldap server. The usernames on the ldap servers the initials of the user. This means that most usernames are only 2 or 3 characters.)

Thorsten
Posts: 14754
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Configure minimum length of a username

Post by Thorsten » Tue Aug 17, 2010 10:39 am

Hi,

this should be easy. We can add a new configure option in 2.7 for this.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply