That Email Address is already in use. Please try again

Despite our best efforts to encourage them to login and upgrade, some prospective paying members who already have free accounts, try to create another account with the same email address when they decide to become paying members.
They get the “Email already in use” message, and then either give up, or contact us to complain.
SURELY that message could be changed to include a login link??
I wanted to change the “Email already in use” message myself, and I found this page from June 2013.
I duly created a plain text file and called it s2-hacks.php. I then put it in a folder called mu-plugins within my wp-content folder.
Unfortunately, although I’d followed the instructions to the letter, I got the text from the .php file across the top of every page on the website!
Please can anyone tell me whether I did something wrong - and more importantly for me, how to modify the error message so that people can login to their existing accounts?
Lastly, if the information on the old s2Member support page is wrong, maybe it should be modified or deleted??
Thanks in advance!

1 Like

You can use “modify” instead “upgrade” s2M payment shortcode, it finds if a member exists already, and sets the right final level. Note, that these shortcodes must be visible for logged only members. Thus, this may need some re-arranging of the pages…

Thanks, but I think you miss the point… (Or maybe I do?)
It happens BECAUSE they are not logged-in.
They don’t remember they already have an account - so they try to create a new one.
Would it be so difficult for s2Member to change the default message they get - to include a link to the login for that member?
PLEASE TRY AGAIN is vague in the extreme - “try again” means “do what you just did - AGAIN”!
So confusing for potential customers.
Why does it have to be so difficult to change the text our customers see??

1 Like

Well, ask them to log in :slight_smile: That is because I say that this may need some re-arranging of the pages.

This is the “clear” way (in my understanding, with s2M). There is the way you mentioned - to change the error message. s2M don’t handle the login process, this is WP duty (while access levels are s2M’s duty), so try to find some WP way. Maybe there is a plugin for that, but I am not checked… If there is not, I can build for you :slight_smile:

Thank you. I didn’t know that it was a WP issue, rather than s2Member.
I’m doing some further research on the matter!

1 Like

I’m having no luck at all with this - could you tell me what building a plugin for us would involve please?

Maybe you can write something using javascript, like what I just implemented on my site below (after a delay, otherwise it won’t work, since you need to replace that message with something else more appropriate and if you don’t give your script a delay it will run before the text is there to be replaced :wink:):

document.body.innerHTML = document.body.innerHTML.replace('That Email Address is already in use. Please try again.', 'Email already in use. Please use another one or <a href="/login">log in</a> instead.');

Of course, you can adjust the text and the url for your login link.

That sounds very hopeful Sim Architect, thank you for your help!
A couple of points though.
First, I don’t know where I should put that script. Should I add it to an existing document - and also, how do I give the script a delay?

1 Like

Oh, I thought you’d know how to do that. You need to adjust and add the java script somewhere in your registration page, and for the timing you need another piece of code.

You can do something like what I pasted below (at your own risk), but make the necessary adjustments, since you might be using a different address for your login page. It should work anywhere, in your footer, header (there’s a plugin for that, but if you don’t have it, you don’t need it for this purpose only) or the body of the page (Custom HTML Block):

<!-- Delayed Loading -->

<script defer>
    window.onload = function(){setTimeout(DelayedLoad, 800);};

    function DelayedLoad() {
        document.body.innerHTML = document.body.innerHTML.replace('That Email Address is already in use. Please try again.', 'Email already in use. Please use another one or <a href="/login">log in</a> instead.');
    }
</script>

The script above only replaces that text (after an 800 millisecond delay) and gives a link to your login page. Once the user logs in they’ll see their “membership area” page. You should have that page customized to show the offer to upgrade as well, it’s very useful as a way to invite existing users of free or lower subscription levels to upgrade as well. If using Pro you can implement a modify form (you can also invite your existing paying subscribers to upgrade to higher tiers this way, not only invite free users, if you have different levels, you can also offer them the chance to change from monthly cycles to yearly etc…). If you’re just using basic PayPal you can place a link to your subscription/upgrade page instead (you should have one :wink:).

I hope this helps. Have fun! :innocent:

Sim Architect - YOU ARE A STAR!
For YEARS now, I’ve been irritated by that ridiculous error message, and I know we’ve lost customers because of it.
At last, it reads: “An account already exists for that email address. Please LOGIN to UPGRADE, or use a different email.”

The only downside appears to be that the cookie notice doesn’t cancel when required. It comes up with a “javascript:void (0);” error (Firefox).

I put the script into the header with a plugin we already had, called Header and Footer Scripts. It says: “The following script, if any, will be inserted into the section using wp_head hook.”
To be honest, the cookie notice not going away is a minor detail in comparison to the chaos caused to our customers by that error notice, but of course I can’t help wondering whether there may be other conflicts that have not appeared yet!

Anyway, thank you so much for your time - I’m so grateful to you.

Eeeek! DISASTER I’m afraid!
With the script in the header, our online videos won’t play.
So near, yet so far!
I’m at a loss to know what to do next. Any help gratefully accepted…

WHEN WILL I LEARN!
When something awful happens on your website, the golden rule is “DON’T PANIC”!

Having thought through the problem with having the script in the header for the whole site, I realised I could add it to each of the relevant pages (which don’t have videos on them) and the problem would be resolved.
I did that, and now I have the correct email error message AND the videos all play!
Thanks again to @thesimarchitect - you truly are a STAR!

1 Like

Glad you got it working!

Yes, if your videos are automatically loaded using the “onload” event for the page and the script above is run first, no other similar script that waits for the same event will run on the same page.

Also, it’s better to add those scripts to the footer instead of the header, since they’re supposed to be run later on anyways.

I wish you an awesome day/evening!

1 Like

Thanks @thesimarchitect - I’ll move them to the footer!
Hope you have a great day ahead!

1 Like

Thanks!

Just letting you know that my code breaks Google Captcha. I am trying to figure out a less intrusive way but so far that’s the only way (replacing the string in the entire body) it’s changing the error message.

I tried using the selector but it won’t change anything. I am surely doing something wrong with my code, maybe someone else knows how to apply the innerhtml.replace only inside the element “s2member-pro-stripe-form-response” without using jQuery. The code below did not work here:

document.getElementById("s2member-pro-stripe-form-response").innerHTML = document.getElementById("s2member-pro-stripe-form-response").innerHTML.replace('That Email Address is already in use. Please try again.', 'Email already in use. Please use another one or <a href="/login">log in</a> instead.');

Maybe someone gives us a solution…

I use the plugin “Simple Google reCAPTCHA” and that’s working fine (with your script in the footer) as far as I can tell.

Awesome!!! I am using s2Member’s native captcha support on my Stripe form and they conflict. I’ll eventually figure out a way to make it work but for now I am just letting the system show that default error message to any user who tries to register again with an existing email address and hoping they reach out if anything. :innocent:

I just keep a message on my Upgrade page.
Note: if you already have an account with us, before proceed make sure you are logged in to your account.
It seems to have worked so far.

1 Like

Really?? I wish more of our members would respond to this notice:

1 Like