Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Age Restriction Mod Idea
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 25 May 2008 :  18:35:05  Show Profile  Reply with Quote
Maybe a fresh eye will help again.

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?<
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 25 May 2008 :  21:19:30  Show Profile  Reply with Quote
Your using the wrong table. i.e. MEMBERS_PENDING not MEMBERS<

Edited by - phy1729 on 25 May 2008 21:20:42
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 25 May 2008 :  21:22:11  Show Profile  Reply with Quote
Tried both, but until registration is complete, the member remains in the pending table (checked the DBase).<
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 25 May 2008 :  21:43:30  Show Profile  Reply with Quote
Pending members have nothing to do with this if I read the topic post correctly.

Also I forgot member tables have a diffrent prefix so it's
strMemberTablePrefix & "MEMBERS<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 25 May 2008 :  22:20:57  Show Profile  Reply with Quote
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.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 25 May 2008 :  23:31:51  Show Profile  Reply with Quote
I figured out a way in.


    strSQL = "SELECT MEMBER_ID, M_KEY, M_DOB FROM " & strMemberTablePrefix & "MEMBERS_PENDING " & _
			 " WHERE M_KEY = '" & key & "'"
    set rsAdult = Server.CreateObject("ADODB.Recordset")
    rsAdult.open strSql, my_Conn
    if rsAdult.EOF or rsAdult.BOF then
    	'do nothing
    else
    	MDOB = rsAdult("M_DOB")
    	MMAge = DateDiff("yyyy", DOBToDate(MDOB), Date)
    end if
		rsAdult.close
		set rsAdult = Nothing


That populates the field. Now to see if the rest works.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 26 May 2008 :  00:32:36  Show Profile  Reply with Quote
Time to move this one. I'm through with it.

I put a copy on SnitzBitz.

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.<
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.4 seconds. Powered By: Snitz Forums 2000 Version 3.4.07