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.

groups with the same name

7 years 11 months ago
Licenses:
JomSocial Expired

Hi I want to create groups with the same name it is possible?
what file I have to modify to remove the control?

7 years 11 months ago
Licenses:

Hi,

please edit:
/components/com_community/models/groups.php
at line 1199,
find this code

public function groupExist($name, $id=0) {
and after that code, put
return false;
at new line. so the code will like this:
public function groupExist($name, $id=0) {
	return false;
	$db		= $this->getDBO();

	$strSQL	= 'SELECT COUNT(*) FROM '.$db->quoteName('#__community_groups')
		. ' WHERE '.$db->quoteName('name').'=' . $db->Quote( $name )
		. ' AND '.$db->quoteName('id').'!='. $db->Quote( $id ) ;


	$db->setQuery( $strSQL );
    try {
        $result = $db->loadResult();
    } catch (Exception $e) {
        JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
    }

	return $result;
}

Done :)
but you need to re-apply this changes after jomsocial upgrade, because the changes will disappear.

Regards

The following user(s) said Thank You: mauro
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