I am tring to override Joomlas function to not allow duplicate email addresses. I know the security issues surrounding this but its I will have to have users with the same email address.

My users are mainly older people and often share a household email address.

I have found where it checks this in the JTableUser class in the check method at line 236

// Check for existing email
        ->where($this->_db->quoteName('email') . ' = ' . $this->_db->quote($this->email))
        ->where($this->_db->quoteName('id') . ' != ' . (int) $this->id);
    $xid = (int) $this->_db->loadResult();

    if ($xid && $xid != (int) $this->id)

        return false;

Is there a way to override this class at a component level?



1 Answer 1


You can override some classes with a system plugin, see here

Or you can create your own authentication plugin, based on an extra field (you could choose one in the user profile plugin to use for that purpose), i.e. save the shared email as an extra field; then do the custom check).

This would only work for authentication (after that, Joomla would use the normal i.e. wrong email field) I'm not sure this is what you want to achieve.

  • Hi, Thanks for your help on this, I have built a plugin that overrides the core User Table class. I don't like it but it works. I really hope they create an option to have unique emails as an option. What's the best way to request a feature these days? Commented Aug 25, 2015 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.