HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Change minimum user name length (http://www.howtoforge.com/forums/showthread.php?t=369)

skeeta 24th August 2005 11:31

Change minimum user name length
 
Hi All

Can I change some configuration file to allow 3 letter usernames (ie les, bob & sue) as I am trying to convert an existing site without upsetting the users!

Thanks for your time.

till 24th August 2005 11:38

Quote:

Originally Posted by skeeta
Hi All

Can I change some configuration file to allow 3 letter usernames (ie les, bob & sue) as I am trying to convert an existing site without upsetting the users!

Thanks for your time.

You have to chnage the ISPConfig code, in the file:

/home/admispconfig/ispconfig/lib/plugins/isp_username.plugin.php

change line 138 from:

Code:

if(!preg_match("/^[a-z][\w\.\-\_]{3,64}$/",$user_prefix . $username)) {
to:

Code:

if(!preg_match("/^[a-z][\w\.\-\_]{2,64}$/",$user_prefix . $username)) {

domino 25th August 2005 03:33

By changing the code above, am I correct to assume that the normal/default login for webmail and ftp can be changed to just a username? Or better yet, firstname_lastname? Please tall me it's possible!? :eek:

falko 25th August 2005 10:06

Quote:

Originally Posted by domino
By changing the code above, am I correct to assume that the normal/default login for webmail and ftp can be changed to just a username? Or better yet, firstname_lastname? Please tall me it's possible!? :eek:

If you don't want the prefix then you can leave empty the field User Prefix under Management -> System Config -> Settings -> ISP Manager.

domino 25th August 2005 10:46

Yes, I know where that is. But I was under the impression that the prefix was manditory. Thanks again for pointing this out. I suppose there would be some slight implication by not providing a prefix?

till 25th August 2005 10:57

Quote:

Originally Posted by domino
Yes, I know where that is. But I was under the impression that the prefix was manditory. Thanks again for pointing this out. I suppose there would be some slight implication by not providing a prefix?

The only problem you might get, is if you have two users withe the name "jones", both would try to get the username "jones". Then the controlpanel denys the second one with an error message like "username jones already exists". This might confuse your customers because they cant see the user jones in the users list, when it belongs to another customer :D

domino 25th August 2005 11:08

Quote:

The only problem you might get, is if you have two users withe the name "jones", both would try to get the username "jones". Then the controlpanel denys the second one with an error message like "username jones already exists". This might confuse your customers because they cant see the user jones in the users list, when it belongs to another customer :D
Point taken till. But I don't think that applies to me as I don't have clients. Only friends and family, so I have full control on who I want to register and what names I want to give them.

Others might take heed to your posts though. As for myself, I just want to make this as least painfull to my computer illiterate parents and friends. :cool:


All times are GMT +2. The time now is 04:14.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.