Categories

Featured templates

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

Chris Diaz January 9, 2012
Rating: 5.0/5. From 2 votes.
Please wait...

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.

Best Joomla Templates
This entry was posted in Joomla! Tutorials and tagged comment, email, framework, in, joomla, k2, use. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket