Author |
Topic |
|
aberbotimue
Starting Member
United Kingdom
41 Posts |
Posted - 07 August 2005 : 20:17:08
|
Not a bug persay, so happy for a mod to move it somwhere more appropriate.. but I could't find a request area.
With a user name of
"Aberbotimue"
NOTE CASE
if you log in as
"aberbotimue"
the line above says
"You are logged on as aberbotimue"
I would say that it is better to use the case of the uername in the database, rather than that of the latest login.
so even if I log in as
"aberbotimue"
it would show up above as
"You are logged on as Aberbotimue"
What are your thoughts people? < |
Nathan Duct tape is like the force, it has a dark side and a light side, and holds the universe together
|
Edited by - Davio on 26 September 2006 05:44:07 |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 02 September 2005 : 17:40:11
|
I agree, that after you login, it displays your username in the case your registered with.< |
Support Snitz Forums
|
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 05 September 2005 : 06:28:04
|
Haven't tested this yet, but give it a whirl, it should work.
Find the following beginning on line 858 of inc_func_common.asp and add the code in green:function chkUser(fName, fPassword, fAuthor)
dim rsCheck
dim strSql
'## Forum_SQL
strSql = "SELECT MEMBER_ID, M_LEVEL, M_NAME, M_PASSWORD "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(fName, "SQLString") & "' "
if strAuthType="db" then
strSql = strSql & " AND M_PASSWORD = '" & ChkString(fPassword, "SQLString") &"'"
End If
strSql = strSql & " AND M_STATUS = " & 1
Set rsCheck = my_Conn.Execute(strSql)
if rsCheck.BOF or rsCheck.EOF or not(ChkQuoteOk(fName)) or not(ChkQuoteOk(fPassword)) then
MemberID = -1
chkUser = 0 '## Invalid Password
if strDBNTUserName <> "" and chkCookie = 1 then
Call ClearCookies()
strDBNTUserName = ""
end if
else
MemberID = rsCheck("MEMBER_ID")
strDBNTFUserName = rsCheck("M_NAME")
if (rsCheck("MEMBER_ID") & "" = fAuthor & "") and (cLng(rsCheck("M_LEVEL")) <> 3) then
chkUser = 1 '## Author
else
select case cLng(rsCheck("M_LEVEL"))
case 1
chkUser = 2 '## Normal User
case 2
chkUser = 3 '## Moderator
case 3
chkUser = 4 '## Admin
case else
chkUser = cLng(rsCheck("M_LEVEL"))
end select
end if
end if
rsCheck.close
set rsCheck = nothing
end function < |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 08 August 2006 : 16:54:32
|
Shaggy, I used instead the strDBNTUsername variable to hold the M_NAME field. Don't want to change the value of strDBNTFUsername at all.
Also in Sub DoCookies(), I stored the strDBNTUsername in the cookie instead of what the user entered into the form field.
Response.Cookies(strUniqueID & "User")("Name") = strDBNTUserName So the name that the user signed up with, is constantly used, after the forum has confirmed that the username matches the one in the database.
You are agree with the changes? I might be overlooking a specific point where this might break something.
I am putting this in the 3.4.06 base code.< |
Support Snitz Forums
|
|
|
OneWayMule
Dev. Team Member & Support Moderator
Austria
4969 Posts |
Posted - 09 August 2006 : 02:34:50
|
I have noticed the behaviour aberbotimue described as well, and I agree, the value from the database should be displayed rather than the one from the login textbox.
[added] Yes, simply change strDBNTFUsername to strDBNTUsername and the issue's gone (just tested).
function chkUser(fName, fPassword, fAuthor)
dim rsCheck
dim strSql
'## Forum_SQL
strSql = "SELECT MEMBER_ID, M_LEVEL, M_NAME, M_PASSWORD "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(fName, "SQLString") & "' "
if strAuthType="db" then
strSql = strSql & " AND M_PASSWORD = '" & ChkString(fPassword, "SQLString") &"'"
End If
strSql = strSql & " AND M_STATUS = " & 1
Set rsCheck = my_Conn.Execute(strSql)
if rsCheck.BOF or rsCheck.EOF or not(ChkQuoteOk(fName)) or not(ChkQuoteOk(fPassword)) then
MemberID = -1
chkUser = 0 '## Invalid Password
if strDBNTUserName <> "" and chkCookie = 1 then
Call ClearCookies()
strDBNTUserName = ""
end if
else
MemberID = rsCheck("MEMBER_ID")
strDBNTUserName = rsCheck("M_NAME")
if (rsCheck("MEMBER_ID") & "" = fAuthor & "") and (cLng(rsCheck("M_LEVEL")) <> 3) then
chkUser = 1 '## Author
else
select case cLng(rsCheck("M_LEVEL"))
case 1
chkUser = 2 '## Normal User
case 2
chkUser = 3 '## Moderator
case 3
chkUser = 4 '## Admin
case else
chkUser = cLng(rsCheck("M_LEVEL"))
end select
end if
end if
rsCheck.close
set rsCheck = nothing
end function [/added]< |
My MODs: Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch
Useful stuff: Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
|
Edited by - OneWayMule on 09 August 2006 02:47:49 |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 09 August 2006 : 02:40:48
|
I've changed that on oxle a long time ago, so yes, I also agree that the real registered case-sensitive username should be shown. If people go all the length to set their name to 'LeEtH4cK3r', it shouldn't be reduced to 'leeth4ck3r'. < |
portfolio - linkshrinker - oxle - twitter |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 09 August 2006 : 03:14:07
|
Thanks guys. Included in the 3.4.06 base code.< |
Support Snitz Forums
|
|
|
|
Topic |
|