magento-1.9,error,email,user – Fixing Newsletter Signup Error Due to Duplicate Email in Magento 1.9

emailerrormagento-1.9user

I want to start using the newsletter on my site. I have three users so I know which email is used.
When I try to register a user for the newsletter it gives me an error:

"Er was een probleem bij het inschrijven: Dit emailadres wordt al door een andere gebruiker gebruikt"

That is Dutch for:

"This email address is already assigned to another user." coming from locale mage_newsletter

Tried different email addresses but always the same message. Anyone who can help me with this? I could not find anything on google about this.
I am rather new to magento.
version 1.9.0.1

Thanks in advance.
Aaron

Best Answer

The controller that process newsletter subscription is

app\code\core\Mage\Newsletter\controllers\SubscriberController.php

and the condition that arises this message seems like this

if ($ownerId !== null && $ownerId != $customerSession->getId()) {
    Mage::throwException($this->__('This email address is already assigned to another user.'));
}

As you can see this code checks whether the customer assigned with given email address matches with email address of logged in customer. If those customer ids do not match, then it will raise this error.

So my assumption is email address that you provided through newsletter and current logged in email address is different. That is why it raises this error.

If the error is not because of this, then you need to dig more from this file.