| Previous topic :: Next topic |
| Author |
Message |
libregeek
Joined: 22 Nov 2005
Posts: 92
Location: Kerala, India
|
| Posted: Mon Jun 04, 2007 7:55 am Post subject: Special Characters in Username |
|
|
Hello all,
It would be very nice if special characters are allowed in the username. This will enable administrators to create username based on the email ids and it will ensure uniqueness. In our setup we use LDAP as the authentication backend and the uid is the form firstname.lastname@domain.tld. So it would be nice to allow '@' , '.' and '-' in the username field.
P.S : In the versions prior to 5.0.2 this feature was enabled. I think this was disabled in 5.0.3
regards
Manilal |
|
| Back to top |
|
libregeek
Joined: 22 Nov 2005
Posts: 92
Location: Kerala, India
|
| Posted: Wed Jun 06, 2007 7:27 am Post subject: Special Characters in Username |
|
|
I have fixed this issue:
Edit the file include/js/general.js (vtiger-5.0.3)
add another condition to the "function valid()" like this c == '@'. The modified function would look like this:
Code:
function valid(c,type)
{
if(type == 'name')
{
return (((c >= 'a') && (c <= 'z')) ||((c >= 'A') && (c <= 'Z')) ||((c >= '0') && (c <= '9')) || (c == '.') || (c == '_') || (c == '-') || (c == '@') );
}
else if(type == 'namespace')
{
return (((c >= 'a') && (c <= 'z')) ||((c >= 'A') && (c <= 'Z')) ||((c >= '0') && (c <= '9')) || (c == '.')||(c==' ') || (c == '_') || (c == '-') );
}
}
Now I can add email id as username. |
|
| Back to top |
|
minnie
Joined: 06 Sep 2005
Posts: 299
Location: CHENNAI,INDIA
|
| Posted: Mon Aug 06, 2007 7:54 am Post subject: Special Characters in Username |
|
|
Dear libregeek,
Thanks for your code. We have integrated your code with vtiger CRM. Kindly checkout the latest source, test it and let me know your feedback.
Ref : http://trac.vtiger.com/cgi-bin/trac.cgi/changeset/11263
Thanks & Regards,
Minnie |
|
| Back to top |
|
libregeek
Joined: 22 Nov 2005
Posts: 92
Location: Kerala, India
|
| Posted: Tue Aug 07, 2007 3:25 am Post subject: Special Characters in Username |
|
|
Thanks Minnie,
I will surely test the code, but now I am busy finding a solution for http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/4102
:)
regards
Manilal |
|
| Back to top |
|
| |