× Joomla Facebook Connect support forum

Topic-icon Invite Module - Who already have application

Active Subscriptions:

None
16 years 6 months ago #2409 by Ivan
Is there a way to segregate users who already have the application installed?
The topic has been locked.
Support Specialist
16 years 6 months ago #2415 by alzander
Do you mean to show the invite module to only users who have registered through JFBConnect, and not standard Joomla users?

Currently, there's no way to do that, but we can investigate some options. Also, read your other post regarding the Invite module, that might answer some of these questions.
The topic has been locked.
Support Specialist
16 years 6 months ago #2429 by alzander
(Ivan messaged us asking us to implement a better check.. this is a response to that message for everyone)

Ivan,
The below code should do what you're looking for. We're not happy with this as a long-term fix, because there are some things we could do better in the JFBConnect component to prevent this. However, this is a good fix for now to get you over your hurdle.

Hope you're ok modifying 1 file. Add the following bold lines. The non-bolded lines should help you figure out where to put the new code:
File: modules/mod_jfbcinvite/tmpl/default.php
~Line 6
require_once (JPATH_ROOT.DS.'components'.DS.'com_jfbconnect'.DS.'helpers'.DS.'facebookhelper.php');
require_once (JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jfbconnect'.DS.'models'.DS.'usermap.php');
$userMapModel = new JFBConnectModelUserMap();
$jUser =& JFactory::getUser();


~Line 17
#if ($fbClient->user == null)
if (($userMapModel->getJoomlaUserId($fbClient->user) != $jUser->get('id')) || $jUser->guest)

Make sure you notice the # in the first line of the 2nd set of code. You need to add this to 'comment' that line out so it does not function.
The topic has been locked.