sign-up more than once with the same email.

Permalink
Hello,

I need to disable the part of the code that checks for if the email already exists in the database ? I want to be able the sign-up more than once with the same email.

Is that possible ?

Thank you in advance.

Tags:

View Replies: View Best Answer
Tony replied on at Permalink Reply
Tony
if you don't mind me asking, why would you want to do something like that? It currently lets you sign up for multiple mailing lists with the same email. I can't really think of a situation where someone would want duplicates of the same email though?

As far as disabling this check goes, it actually happens in at least two places, on the subscriptions side of things, and during the send process. I'm not sure if you'd run into some other adverse side-effects if you disabled both of these. I can point you to those sections of code if you'd like, but I'm hoping that after you explain your problem we might be able to come up with a better solution.
87up replied on at Permalink Reply
I need to do this because I am running a house keeping service. If people got more than one house, they need to be able to sign up with the same email for all there homes. I am generating a mail for each house.

I hope this make sense. :)
Tony replied on at Permalink Reply
Tony
is there a unique email sent out for each house?
87up replied on at Permalink Best Answer Reply
Edit:

I found a solution:

I just needed to outcomment these lines of code:

tony_mailing_list.php:

/*$nonUser = TonyMailingListNonUser::getByEmail( $this->email );
      if($nonUser){
         $this->errorMsgs[]=t('Email already exists'); 
         return false;
      }*/

controller.php;

if( (!is_object($u) || !intval($u->uID)) ){  
               /*$nonUser = TonyMailingListNonUser::getByEmail($submittedEmail);  
               if(!$nonUser){*/
                  $nonUser = new TonyMailingListNonUser( array('email'=>$submittedEmail,'attrData'=>$nonUserAttrData) ); 
                  $nonUser->create();
               /*}else{
                  $nonUser->attrDataRaw = serialize($nonUserAttrData); 
                  $nonUser->update();
               }*/
               //is there a registered user record with this same email address? 
               $ui = UserInfo::getByEmail( $submittedEmail );
            }
Tony replied on at Permalink Reply
Tony
yup, looks like you figured it out.