PDA

View Full Version : Change minimum user name length


skeeta
24th August 2005, 11:31
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
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:

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

to:

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
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
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
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: