Leave a suggestion

If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

Joomla K2 Troubleshooter. Error “The Name or Email Address you typed is already in use!”

Testing K2 Joomla components we’ve located the following issue: trying to post a comment using the name and the email if the registered user (typing them into the name and email fields) you can see the error message:

The Name or Email Address you typed is already in use!

To resolve this issue you need to perform some updates to the K2 core file.

Open your Joomla installation directory and open “components/com_k2/models/item.php” with your editor.

There locate and delete or comment the following code:

if  ($user->guest){
  $db = & JFactory::getDBO();
  $query = "SELECT COUNT(*) FROM #__users WHERE  name=".$db->Quote($userName)." OR  email=".$db->Quote($commentEmail);
  $db->setQuery($query);
  $result = $db->loadresult();
  if ($result>0){
  echo JText::_('The name or email address you typed is already in use!');
  $mainframe->close();
  }
}

In other words replace it with

  /*if  ($user->guest){
  $db = & JFactory::getDBO();
  $query = "SELECT COUNT(*) FROM #__users WHERE  name=".$db->Quote($userName)." OR  email=".$db->Quote($commentEmail);
  $db->setQuery($query);
  $result = $db->loadresult();
  if ($result>0){
  echo JText::_('The name or email address you typed is already in use!');
  $mainframe->close();
  }
  }*/

This should solve the issue.

  • Guest

    Another solution could be to change the error message something like:
    This email address is already used by a registered user. Please login to comment or use another email id.