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.

Photo appears in Latest Photos before account is approved

7 years 5 months ago
  • Jim's Avatar
    Topic Author
  • Jim
  • Offline
  • Fresh Boarder
  • Posts: 40
  • Thank you received: 1
Licenses:
JomSocial Active Socialize Expired

ISSUE SUMMARY:
JS allows profile photos added during registration to be displayed in Latest Photos before the account has been approved. This should not happen. On my site new registration requires approval by the Administrator before the account becomes active and in some cases approval is not granted.

How to prevent this from happening?

STEPS TO REPLICATE:
1
2
3
4
5
RESULT
EXPECTED RESULT
BROWSER

7 years 5 months ago
Licenses:

Hi, Jim.

Thank you for contacting us.
I assign developer to further investigate this issue.
He'll contact you soon.


- 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
7 years 5 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Jim,

This is valid bug, thank you for reporting..

cheers!

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

Hi Jim,

To fix this issue open this file components/com_community/models/photos.php, add this code after line 340

if($hideInactiveUser){
             $queryInactiveUser  = 'SELECT id FROM '.$db->quoteName('#__users');
             $queryInactiveUser  .= ' WHERE '.$db->quoteName('block').' = ' . $db->Quote(1);
             
             $db->setQuery($queryInactiveUser);
 
             $inactiveUser = $db->loadObjectList();
 
             $inactiveUser = implode(",", array_map(function ($item) {
                 return $item->id;
             }, $inactiveUser));
             
             if ($inactiveUser) {
                 $query .= ' AND a.'.$db->quoteName('creator').' NOT IN (' . $inactiveUser . ') ';
             }
         }

find this code :
public function getAllPhotos($albumId = null, $photoType = PHOTOS_USER_TYPE, $limit = null, $permission = null, $orderType = 'DESC', $primaryOrdering = 'ordering', $hidePrivateGroupPhotos = false) {
replace to :
public function getAllPhotos($albumId = null, $photoType = PHOTOS_USER_TYPE, $limit = null, $permission = null, $orderType = 'DESC', $primaryOrdering = 'ordering', $hidePrivateGroupPhotos = false, $hideInactiveUser = false) {

then open this file modules/mod_community_photos/mod_community_photos.php, find this code :
$sortBy, true);
replace to :
$sortBy, true,true);

thank you!

7 years 5 months ago
  • Jim's Avatar
    Topic Author
  • Jim
  • Offline
  • Fresh Boarder
  • Posts: 40
  • Thank you received: 1
Licenses:
JomSocial Active Socialize Expired

Ok, this is not working for me. After editing the files I get a blank page when visiting my site. Please feel free to access admin and check it out.

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

Hi Jim,

Please check again, I already applied the patch..

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