Changeset 9376


Ignore:
Timestamp:
Feb 25, 2011, 12:54:24 AM (9 years ago)
Author:
plg
Message:

bug fixed: the group list for a given user may be empty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/community/include/functions_community.inc.php

    r9372 r9376  
    5555  if ($user_id != $conf['guest_id'])
    5656  {
    57   $query.= '
     57    $query.= '
    5858    OR (type = \'any_registered_user\')
    59     OR (type = \'user\' AND user_id = '.$user_id.')
    60     OR (type = \'group\' AND group_id IN ('.implode(',', $user_group_ids).'))
    61 ';
     59    OR (type = \'user\' AND user_id = '.$user_id.')';
     60
     61    if (count($user_group_ids) > 0)
     62    {
     63      $query.= '
     64    OR (type = \'group\' AND group_id IN ('.implode(',', $user_group_ids).'))';
     65    }
    6266  }
    6367   
Note: See TracChangeset for help on using the changeset viewer.