Here's the routine for register.asp - after the else, it continues with adult auto-joining (if applicable):
strSQL = "SELECT M_DOB FROM " & strTablePrefix & "MEMBERS_PENDING " & _
"WHERE M_NAME = '" & strNewMemberName & "'"
set rsAdult = Server.CreateObject("ADODB.Recordset")
rsAdult.open strSql, my_Conn
if not rsAdult.EOF then
Member_DOB = rsAdult("M_DOB")
MMAge = DateDiff("yyyy", DOBToDate(Member_DOB), Date)
end if
rsAdult.close
set rsAdult = Nothing
if MMAge < 21 then
USERGROUP_ID = 8
MEMBER_TYPE = 1
set rsClr = my_Conn.execute(strSql)
if not rsClr.BOF and not rsClr.EOF then
strSql = "INSERT INTO " & strTablePrefix & "USERGROUP_USERS " &_
"(USERGROUP_ID, MEMBER_ID, MEMBER_TYPE) VALUES "
myConn.execute(strSql)
end if
rsClr.close
set rsClr = Nothing
else
I'm not getting a value from the age check routine (in red), anyone see why?<
You missed the fourth-to-last post. I'm modifying register.asp so that new members who are minors will automatically be assigned to a user group which precludes their having access to portions of the board. Thus it definitely does have to do with pending members.
As for strMemberTablePrefix, that isn't the issue; tried that.<
Upon registration, minors (between your minimum age restriction and 21) will automatically be assigned to a minors' usergroup (which denies access to any "Adult" areas) that you create.
When the minor turns 21, they are automatically moved from the minors' usergroup to the members' usergroup and allowed access to those formerly restricted areas.<