Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Connect with facebook with an email already registered in website.

7 years 5 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi John,

To fix this issue
- open this file components/com_community/controllers/connect.php add this code after this code ob_start();

// email validation
             if (CUserHelper::getUserIdByEmail($email)) {
                 $html  = '<div style="margin-bottom: 5px;">' . JText::_('COM_COMMUNITY_ERROR_VALIDATING_FACEBOOK_ACCOUNT') . '</div>';
                 $html .= '<div><strong>' . JText::_('COM_COMMUNITY_FACEBOOK_EMAIL_MESSAGE') . '</strong></div>';
 
                 $json = array(
                     'title' => $config->get('sitename'),
                     'error' => $html,
                     'btnBack' => JText::_('COM_COMMUNITY_BACK_BUTTON')
                 );
 
                 die( json_encode($json) );
             } 

- open this file components/com_community/helpers/user.php and add this new function on it
static public function getUserIdByEmail($email)
         {
             $db = JFactory::getDBO();
             $query = 'SELECT ' . $db->quoteName('id') . ' '
                 . 'FROM ' . $db->quoteName('#__users') . ' '
                 . 'WHERE ' . $db->quoteName('email') . '=' . $db->Quote($email);
 
             $db->setQuery($query);
 
             $id = $db->loadResult();
 
             return $id;
         } 

- add the translation string on this file language/en-GB/en-GB.com_community.ini
COM_COMMUNITY_FACEBOOK_EMAIL_MESSAGE="The email address is already in use."

thank you!

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW