Author |
Topic |
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 03 September 2003 : 16:25:21
|
I seem to have the same problem as Gargoyle... When a user register on my forum (no problem whatsoever with that part) he/she isn't added to the default usergroup (wich has "auto join" ON). I run Snitz/Serverhacker on MySQL on a unix server. All "bugfixes" in this thread is added and also the one that altisdesign entered. I can't find an answer to why this won't work on this forum, and I don't know wich asp page you would want to take a look at either. Sorry if I should've posted this in the "mod implementation" forum but since Gargoyle posted the same problem here I did so too... The problem should be in register.asp? |
/Tribaliztic - www.gotlandrace.se -
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 03 September 2003 : 16:57:48
|
Here's the actual code snippet: strSql = strSql & ", 1" strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords AddToNewsletter(chkString(rsKey("M_EMAIL"),"SQLString"))
Call DoCount
Call UserGroupAutoJoin(chkString(rsKey("M_NAME"),"SQLString")) '####### UserGroup MOD #######
'## Forum_SQL - Delete the Member strSql = "DELETE FROM " & strMemberTablePrefix & "MEMBERS_PENDING " strSql = strSql & " WHERE M_KEY = '" & key & "'"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><b>Registreringen är fullföljd!</b></font></p>" & vbNewLine & _
and here's the link: http://www.gotlandrace.com/temp/register.txt |
/Tribaliztic - www.gotlandrace.se -
|
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 03 September 2003 : 19:55:07
|
nevermind, i got it to open okay.
i don't see anything wrong off the top. do you have more than one forum?
make the sub at the bottom of the file look like the following just for testing (added code in red). then try to register a new person and see what response you get.
'####### Begin UserGroup MOD #######
Sub UserGroupAutoJoin(strNewMemberName)
response.write "creating autojoin for member " & strNewMemberName & "<br />"
strSql = "SELECT USERGROUP_ID FROM " & strTablePrefix & "USERGROUPS " &_
"WHERE AUTOJOIN = 1"
set rsAutoJoin = my_Conn.execute(strSql)
arAutoJoin = Null
if not rsAutoJoin.bof and not rsAutoJoin.eof then arAutoJoin = rsAutoJoin.GetRows
rsAutoJoin.close
set rsAutoJoin = Nothing
response.write "checking existence of autojoin groups ... <br />"
if not IsNull(arAutoJoin) then
response.write "autojoin group found ... <br />"
for AJCnt = LBound(arAutoJoin,2) to UBound(arAutoJoin,2)
strSql = "SELECT MEMBER_ID FROM " & strMemberTablePrefix & "MEMBERS " &_
"WHERE M_NAME = '" & strNewMemberName & "'"
set rsUser = my_Conn.execute(strSql)
response.write "getting member id ... <br />"
if not rsUser.bof and not rsUser.eof then
strSql = "INSERT INTO " & strTablePrefix & "USERGROUP_MEMBERS " &_
"(USERGROUP_ID, MEMBER_ID, MEMBER_TYPE) VALUES " &_
"(" & arAutoJoin(0,AJCnt) & ", " & rsUser("MEMBER_ID") & ", 1)"
my_Conn.execute(strSql)
response.write "member added to autojoin group <br />"
end if
rsUser.close
set rsUser = Nothing
next
end if
response.write "end autojoin group add"
response.end
End Sub
'####### End UserGroup MOD #######
|
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 04 September 2003 : 02:39:52
|
I have a testing-forum (as you suggested in your readme) in usergroupsforum/ and the "live" in forum/
Will try that now and come back to you! |
/Tribaliztic - www.gotlandrace.se -
|
|
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 04 September 2003 : 02:57:32
|
nothing came up when I registered a new member, at least nothing that I managed to see. I came to the "please follow the instructions in the e-mail that's been automatically sent to you"-page. The user was not added to the default membergroup. |
/Tribaliztic - www.gotlandrace.se -
|
|
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 04 September 2003 : 06:31:00
|
*doh* Sorry to take up your time... Offcourse I have to change the link in the e-mail validation mail that I recieve after registration to "groupsforum" instead of "forum"... It's working now =) |
/Tribaliztic - www.gotlandrace.se -
|
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
|
|
Topic |
|