public static function search_roles($group, $role = '')
	{
		if ($role == '')
		{
			return false;
		}

		$db =  \App::get('db');

		$query = "SELECT uidNumber FROM `#__xgroups_roles` as r, `#__xgroups_member_roles` as m WHERE r.id='" . $role . "' AND r.id=m.roleid AND r.gidNumber='" . $group->gidNumber . "'";

		$db->setQuery($query);

		$result = $db->loadColumn();

		$result = array_intersect($result, $group->members);

		if (count($result) > 0)
		{
			return $result;
		}
	}
public static function search_roles($group, $role = '')
	{
		if ($role == '')
		{
			return false;
		}

		$db =  \App::get('db');

		$query = "SELECT uidNumber FROM `#__xgroups_roles` as r, `#__xgroups_member_roles` as m WHERE r.id='" . $role . "' AND r.id=m.roleid AND r.gidNumber='" . $group->gidNumber . "'";

		$db->setQuery($query);

		$result = $db->loadColumn();

		$result = array_intersect($result, $group->members);

		if (count($result) > 0)
		{
			return $result;
		}
	}
public static function search_roles ( $ group , $ role = '' ) { if ( $ role == '' ) { return false ; } $ db = \ App :: get ( 'db' ) ; $ query = "SELECT uidNumber FROM `#__xgroups_roles` as r, `#__xgroups_member_roles` as m WHERE r.id='" . $ role . "' AND r.id=m.roleid AND r.gidNumber='" . $ group -> gidNumber . "'" ; $ db -> setQuery ( $ query ) ; $ result = $ db -> loadColumn ( ) ; $ result = array_intersect ( $ result , $ group -> members ) ; if ( count ( $ result ) > 0 ) { return $ result ; } }
Search group roles

@param   object  $group
@param   string  $role
@return  array
Search group roles