New user registrations

I've installed Dolphin 7.0.5 and have gotten almost everything running properly on a Windows 2008 server running IIS7 (with the exception of Forums, but I'm not concerned about that right now).  I am wanting to require a parent's email address in the registration if the person is under the age of 13 and have it send an email notification to the parent letting them know that their child has registered on the site and to click the link to confirm their email to activate the account.  So I added a field for ParentEmail to the profile registration page to start with.  I thought I would first just try and send a CC of the confirmation email to the ParentEmail address as well as the users email.  Could someone point me in the right direction as to which file processes the confirmation email?

Thank you!

Quote · 14 Feb 2011

Maybe the better question is: what would be the best way to accomplish sending a notification to a parent email address if a user is under 13?

Quote · 15 Feb 2011

 

Maybe the better question is: what would be the best way to accomplish sending a notification to a parent email address if a user is under 13?

Sorry not sure that understood you. Do you want change text in email template for new user confirmation?

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 16 Feb 2011

No, not change the text in the new user confirmation, I want to have it send a copy of the confirmation email to another email address (the ParentEmail field I setup).  I'm sure that would require some modification in the code, which is fine.  I just normally program in .Net and not so sharp with php, although I can usually figure it out.  Just wondering what file to edit to add that CC for the confirmation email.  Thanks!

Quote · 16 Feb 2011

This sounds like a fairly complicated procedure.  I don't have the coding experienece to do it, but I may be able to help with the logic.  Based upon my experience with D7, this at the least would probably have to be done:

1-Set up a second email field in Admin>Builders>Profile Fields>Join Form.  This would involve also setting a language key for your second email field.  Looks like you did this.  Here's where it gets complicated

2-The first email field is mandatory.  The second email field has to be coded such that it only becomes mandatory if someone is under 13.  There is currently no age field in the email block.

3-You have to make sure the second email field gets added correctly in your DB, since all profile info is recorded there.  It might occur automatically but I'm not sure due to the coding revisions needed for step 2.

4-The Dolphin confirmation procedure has to be rewritten such that if a new member is under 13 BOTH EMAILS would have to be confirmed through replies before that new member could access the site (parental permission would be required).

Good places to start would be member.php and join.php., in your site root.  Also check in inc/classes/BxDolEmailTemplates.php.

Best of luck with this.  Seems like a worthwhile mod for other site owners.  Please post solutions when you find them.

Someday, Someway.
Quote · 16 Feb 2011

Yeah, I'm thinking it might get a little more complex than I might be able to handle.  If it was asp.net I could do it in a heartbeat :-) but good open source social networking sites in asp.net are pretty much non-existent.  I really like Dolphin and hope I can get it to work for my needs.  If anyone has some ideas or know of a mod that might help, let me know!

Quote · 16 Feb 2011

You might try posting this as a job in the market.  There is bound to be someone experienced in D7 who would know the files and could code it easily.  You could even ask some of the developers directly to see if they would create it for general sale in the market.  I think an "Under 13 Sign-up" mod would do well.

Someday, Someway.
Quote · 16 Feb 2011

Yea! I resolved the check for under 13, then make a Parent Email mandatory on the Join form.  Hopefully this will helps someone else.

First, I went into the ProfileBuilder and added a field called ParentEmail, but did not make it mandatory.

I edited the file  /inc/classes/BxDolProfileFields.php

Change the following code:


foreach ($aMyChecks as $sCheck ) {
            $sFunc = 'checkPostValueFor' . $sCheck;
            
            $mRes = $this -> $sFunc( $aItem, $mValue, $iHuman, $iProfileID );
            
            if( $mRes !== true ) {
                if( is_bool( $mRes ) ) // it is false...
                    return _t( $aItem[ $sCheck . 'Msg' ], $aItem[$sCheck] );
                else
                    return $mRes; // returned as text
            }
        }
        
        return true;

To this:


// OakLaneSolutions add for underage check
        $mUnderAge = false;
        foreach ($aMyChecks as $sCheck ) {
            if( $aItem['Name'] == 'DateOfBirth' ) { 
            	$iYears = age($mValue);
				if( $iYears < 13){
        		   $mUnderAge = true;
        		}
        		else {
        		   $mUnderAge = false;             
       			 }

            }
            //ParentEmail mandatory if under 13, otherwise optional
			if (( $aItem['Name'] == 'ParentEmail' ) && ( $mUnderAge )) {
            	$sFunc = 'checkPostValueForMandatory';
            }
            else {
            $sFunc = 'checkPostValueFor' . $sCheck;
            }
            $mRes = $this -> $sFunc( $aItem, $mValue, $iHuman, $iProfileID );
            // check to see if it is a ParentEmail field and if they are underage
            
            if( $mRes !== true ) {
                if( is_bool( $mRes ) ) // it is false...
                    return _t( $aItem[ $sCheck . 'Msg' ], $aItem[$sCheck] );
                else
                    return $mRes; // returned as text
            }
        }
        
        return true;
Quote · 18 Feb 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.