How do you make it so that the usernames don't have be to case sensitive? I don't want it so that someone can make "bubba" and someone else can make "Bubba" I'm making people create their own accounts, have the password lookup mod which also has the change password mod.
Aug 13, 1999, 1:09 PM
Veteran / Moderator (8669 posts)
Aug 13, 1999, 1:09 PM
Post #2 of 17
Views: 6300
In sub change_password, look for the line
if ($pass =~ /^$db_userid:/) {
Try changing that to
if ($pass =~ /^$db_userid:/i) {
Later note: This one will stay the same.
In the replacement for sub signup look for
if ($in{'userid'} eq $userid) {
change that to
if (lc($in{'userid'}) eq lc($userid)) {
Later note: This one is different.
I'm not sure it will work, but it should.
Those are the only two places where people enter usernames, so that should be the only places you'll need to change it. Oh, sub admin_display. Hmmmm. Just a sec and I'll look for it.
Here it is. Change
if ($in{'new_username'} eq $userid) {
to
if (lc($in{'new_username'}) eq lc($userid)) {
Later note: This one is different.
This will allow someone to add a name like "Bubba2" or "SubBubba." But will not allow bubba or BuBbA
------------------
JPD
[This message has been edited by JPDeni (edited August 16, 1999).]
if ($pass =~ /^$db_userid:/) {
Try changing that to
if ($pass =~ /^$db_userid:/i) {
Later note: This one will stay the same.
In the replacement for sub signup look for
if ($in{'userid'} eq $userid) {
change that to
if (lc($in{'userid'}) eq lc($userid)) {
Later note: This one is different.
I'm not sure it will work, but it should.
Those are the only two places where people enter usernames, so that should be the only places you'll need to change it. Oh, sub admin_display. Hmmmm. Just a sec and I'll look for it.
Here it is. Change
if ($in{'new_username'} eq $userid) {
to
if (lc($in{'new_username'}) eq lc($userid)) {
Later note: This one is different.
This will allow someone to add a name like "Bubba2" or "SubBubba." But will not allow bubba or BuBbA
------------------
JPD
[This message has been edited by JPDeni (edited August 16, 1999).]
Aug 15, 1999, 8:34 PM
Novice (44 posts)
Aug 15, 1999, 8:34 PM
Post #3 of 17
Views: 6290
I just want to get rid of case sensitivity. I want people to be able to make Bubba1, Bubba2, etc. However, I want Bubba1 to work the same as BuBBa1 when they log in. I put in the code you gave me and it worked fine in not letting others have BUbbA when I have Bubba.
Also, what about the logins that ask for the username when you need to relogin after chanign your password or email?
Thanks
Also, what about the logins that ask for the username when you need to relogin after chanign your password or email?
Thanks
Aug 15, 1999, 8:59 PM
Veteran / Moderator (8669 posts)
Aug 15, 1999, 8:59 PM
Post #4 of 17
Views: 6299
Take out the code I gave you, because it won't give you want you want.
I'll change the code in my previous message, so this thread doesn't get too long.
What about them?
------------------
JPD
I'll change the code in my previous message, so this thread doesn't get too long.
Quote:
Also, what about the logins that ask for the username when you need to relogin after chanign your password or email?------------------
JPD
Aug 16, 1999, 11:15 AM
Novice (44 posts)
Aug 16, 1999, 11:15 AM
Post #7 of 17
Views: 6283
Thanks for the help so far, but I'm still having a problem. Let's say I create an account as Bubba. When I log in, I want to be able to log in as bubba, BubBa, etc...but it says invalid username. It won't let anyone create another bubba or BuBBa, but I want to be able to log in as it.
Aug 16, 1999, 6:38 PM
Veteran / Moderator (8669 posts)
Aug 16, 1999, 6:38 PM
Post #8 of 17
Views: 6296
Well, that's a completely different question that what you asked before.
Look in auth.pl for
change it to
Further down in that same script find
change that to
That oughta do it, but I haven't tested it.
------------------
JPD
Look in auth.pl for
Code:
if (($in{'userid'} eq $userid) && (crypt($in{'pw'}, $pw) eq $pw)) {change it to
Code:
if ((lc($in{'userid'}) eq lc($userid)) && (crypt($in{'pw'}, $pw) eq $pw)) {Further down in that same script find
Code:
if ($username eq $name) {change that to
Code:
if (lc($username) eq lc($name)) {That oughta do it, but I haven't tested it.
------------------
JPD
Jan 25, 2002, 10:49 AM
Novice (47 posts)
Jan 25, 2002, 10:49 AM
Post #10 of 17
Views: 6324
Hi JPDeni,
I was looking for info on case sensitive usernames and found it but it was too much and all over the place with modified posts etc that made it difficult for me to understand as I did not see the conversation take place. Will it be possible for you to post it again in entirety or may be as a modification or some thing? My problem being that I want the John, jOHn, joHN all to be the same. To this end I think if the username and password are stored in lower case it should resolve the issue. Correct me if I am wrong.
I would not know a script if it bit me ...... I know you are busy and have to look after more serious issues but if you be a little more detailed
Thanks in advance
FHN
I was looking for info on case sensitive usernames and found it but it was too much and all over the place with modified posts etc that made it difficult for me to understand as I did not see the conversation take place. Will it be possible for you to post it again in entirety or may be as a modification or some thing? My problem being that I want the John, jOHn, joHN all to be the same. To this end I think if the username and password are stored in lower case it should resolve the issue. Correct me if I am wrong.
I would not know a script if it bit me ...... I know you are busy and have to look after more serious issues but if you be a little more detailed
Thanks in advance
FHN
Jan 26, 2002, 1:13 AM
User (92 posts)
Jan 26, 2002, 1:13 AM
Post #11 of 17
Views: 6335
I can not exactly help you....
JPDeni hasnt been around for while now...
from her profile:
Last Logon: Oct 12, 2001, 3:06 PM
--------------
some good resources you should check out :
LoisC DBMan Unofficial FAQ:
http://webmagic.hypermart.net/dbman/
of course JPDeni's site:
http://www.jpdeni.com/dbman/
good luck,
Warp.
JPDeni hasnt been around for while now...
from her profile:
Last Logon: Oct 12, 2001, 3:06 PM
--------------
some good resources you should check out :
LoisC DBMan Unofficial FAQ:
http://webmagic.hypermart.net/dbman/
of course JPDeni's site:
http://www.jpdeni.com/dbman/
good luck,
Warp.
Jan 27, 2002, 12:49 PM
Veteran / Moderator (3034 posts)
Jan 27, 2002, 12:49 PM
Post #14 of 17
Views: 6306
Did you try modifying your auth.pl file as instructed in Post #8? That seems to state exactly what changes need to be made. If so, did it work as expected?
Unoffical DBMan FAQ
http://creativecomputingweb.com/dbman/index.shtml/
Unoffical DBMan FAQ
http://creativecomputingweb.com/dbman/index.shtml/
Jan 29, 2002, 9:27 PM
Novice (47 posts)
Jan 29, 2002, 9:27 PM
Post #15 of 17
Views: 6222
Hi LoisC,
Thanks for your help. I tried the instructions as described in the post above. I had already created a user 'test' so I tried logging in as 'Test' with the same password but it did not work, then I tried creating another user 'Test' and it worked. Meaning I now have 2 users 'test' and 'Test'. While I just want it all to be non case sensitive whether creating users or logging in.
Thanks in advance
FHN
Thanks for your help. I tried the instructions as described in the post above. I had already created a user 'test' so I tried logging in as 'Test' with the same password but it did not work, then I tried creating another user 'Test' and it worked. Meaning I now have 2 users 'test' and 'Test'. While I just want it all to be non case sensitive whether creating users or logging in.
Thanks in advance
FHN
Feb 9, 2002, 8:31 AM
Novice (47 posts)
Feb 9, 2002, 8:31 AM
Post #17 of 17
Views: 6229
Hi LoisC,
Let me correct myself first. The fix that you directed me to, actually worked. What I wanted to say was that I wanted to make the password also case insensitive. Meaning that both the username and the password become non case sensitive.
Thanks for the guidance and sorry for the misleading post earlier.
FHN
Let me correct myself first. The fix that you directed me to, actually worked. What I wanted to say was that I wanted to make the password also case insensitive. Meaning that both the username and the password become non case sensitive.
Thanks for the guidance and sorry for the misleading post earlier.
FHN