We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5011
    • 1 Posts
    Hi,
    Sorry if this is already on here somewhere but I can’t find it.....
    When creating Web Users it doesn’t allow Email addresses to be used more than once - Email is already in use!
    Is there any way round this at all so an email address can be used on more than one Web User Account?
    Thanks,
    Dawn.
      • 25547
      • 61 Posts
      I am interested in this also..

      For testing just now you need tons of addresses
        • 7231
        • 4,205 Posts
        As GaneshXL recommended just setup a catch-all account and use whatever address you want [email protected] [email protected] etc... This way you can keep the system intact while you test. Having a unique email is important since the "forgot my password" feature will not work without a unique email. Also the email needs to be unique, but it does not need to be a real email. I create test accounts with fake address,

        Anyway, if you really want to hack at it, the file to edit is the processors/save_web_user.processor.php if you are adding users in the manager, or the WebSignup snippet if you are using this in the front end.

        I am not sure what to edit but you need to edit it twice since it checks on creating new and on editing users. It might just be a matter of commenting out these lines:
        		// check if the email address already exist
        		$sql = "SELECT id FROM $dbase.`" . $table_prefix . "web_user_attributes` WHERE email='$email'";
        		if (!$rs = mysql_query($sql)) {
        			webAlert("An error occurred while attempting to retrieve all users with email $email.");
        			exit;
        		}
        		$limit = mysql_num_rows($rs);
        		if ($limit > 0) {
        			$row = mysql_fetch_assoc($rs);
        			if ($row['id'] != $id) {
        				webAlert("Email is already in use!");
        				exit;
        			}
        		}


        But I recommend using fake email addresses grin
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 25547
          • 61 Posts
          Yes, I have now begun to use fake email adresses grin

          I try to make them so that no one could possibly have them.
            • 2912
            • 315 Posts
            If you have a gmail account you can always use the ’+’ in your email address to create the impression of lots of email addresses but actually they always goto the same inbox:

            [email protected]
            [email protected]
            .
            .
            .
            etc.

            Some other email providers allow this too.
              BBloke
              • 7231
              • 4,205 Posts
              That is interesting I did not know that trick. I wonder why Gmail has this feature?
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don't know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 2912
                • 315 Posts
                It comes in handy when setting up filters. If you sign up to website that tend to send you drivel and spam then you can use ’+spam’ in your email name and then setup a filter to get those email out of your inbox.

                Its pretty neat.
                  BBloke