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.
ISSUE SUMMARY:
I'm doing a new webpage for a club. We are using Jomsocial for years now for club internal stuff.
Now I'm facing the following issue: We also want to implement a online shop (virtue Mart) for selling merchandise - for public and Club members. This means two different user groups. Shop customers should not be able to enter the members area / Community.
I thought about solving this via access rules. So far it works, that customers (registered access) do not have access to Jomsocial but Members (members access) do have access.
The problem is, that customers (registered access) are listed in the members list and get profiles. Is there anyway to completely exclude these users from the community?
(I guess multi profile & access plugin dies not help as it just regulates existing profiles?)
Hmm... JomSocial is Joomla! extension what means that every Joomla! user become JomSocial user. Even if some users have locked access to JS, their profiles will be displayed in JS... they may be searched. as fo now JomSocial doesn't support Joomla! ACL. This is planned for JomSocial 4.3:
www.jomsocial.com/features/road-map
You may have two choices:
1. Customize JomSocial to filter-out all profiles related to J! accounts from certain J! group. A lot of coding: list customizations, module customizations, feature locking and search hacking.
2. Or this extension may help:
www.readybytes.net/jomsocial-profile-type.html
. I'm not sure so please, contact with JSPT developers and ask if their extension will be suitable to what you plan.
- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.
- Use the "Thank You" feature on any post that helped you
thank you for your fast reply. I choose the customisation. Just for documentation and perhaps a professional feedback from you here are my changes:
I thought before modifying everything I catch this problem at the beginning. I remembered there is a privacy setting for administrators. As I don't need it because administrators are normal members I can use this setting.
I copied getSuperAdmins() in /com_community/moedels/user.php and changed the copied function to getShopCustomers. Then changed user group from 8 (super users) to 2 (registered)
Line606:
public function getSuperAdmins() {
$db = $this->getDBO();
$query = 'SELECT a.*'
. ' FROM ' . $db->quoteName('#__users') . ' as a, '
. $db->quoteName('#__user_usergroup_map') . ' as b'
. ' WHERE a.' . $db->quoteName('id') . '= b.' . $db->quoteName('user_id')
. ' AND b.' . $db->quoteName('group_id') . '=' . $db->Quote(8);
$db->setQuery($query);
$users = $db->loadObjectList();
return $users;
}
// get Shop Customers for not showing them in Lists and search
public function getShopCustomers() {
$db = $this->getDBO();
$query = 'SELECT a.*'
. ' FROM ' . $db->quoteName('#__users') . ' as a, '
. $db->quoteName('#__user_usergroup_map') . ' as b'
. ' WHERE a.' . $db->quoteName('id') . '= b.' . $db->quoteName('user_id')
. ' AND b.' . $db->quoteName('group_id') . '=' . $db->Quote(2);
$db->setQuery($query);
$users = $db->loadObjectList();
return $users;
}
Then replace getSuperAdmins() in seach.php and user.php with getShopCustomers. Kept it in events.trigger and groups.trigger because here it is used to send notifications to administrators. (Would be kind of funny if all shop users would get these ;)
Attachment ScreenShot2015-11-28at11.21.03.png not found
Result: all “registered” Users will not be shown but members and administrators. I basically tested it and it worked fine.
What do you think about these changes? I couldn't see any security relations but I'm not that familiar with the overall code of jomsocial.