Wednesday, December 11, 2013

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

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();

*/

 


1




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

No comments:

Post a Comment